0

I have the following function:

ggplot(parte2, aes(IDENTIFICADOR,MEM_A)) + 
  geom_point() + 
  scale_x_continuous(breaks=seq(0, 100, 5))+ 
  scale_y_continuous(breaks=seq(0, 100000, 2000))

but this give me a graphic without order the level x, and i want to order it due to the value that takes de IDENTIFICADOR in the MEM_A.

I use the following function:

ggplot(parte2, aes(as.numeric(reorder(IDENTIFICADOR,MEM_A)),MEM_A)) + 
  geom_point()  + 
  scale_y_continuous(breaks=seq(0, 100000, 2000))

the plot is order but the index in the axes x it isnt is correct.

INPUT_1<-parte2[,2]
INPUT_2<-parte2[,3]
CPU_A<-parte2[,4]
MEM_A<-parte2[,5]
CPU_B<-parte2[,6]
MEM_B<-parte2[,7]

ggplot(parte2, aes(fct_reorder(IDENTIFICADOR, MEM_A, min),MEM_A)) + 
  geom_point()+ 
  scale_y_continuous(breaks=seq(0, 100000, 2000))
Vinícius Félix
  • 8,448
  • 6
  • 16
  • 32
Esteban
  • 31
  • 1
  • 6

0 Answers0