Desktop productivity for business analysts and programmers

PROC GPLOT observations order

Posts: 34

PROC GPLOT observations order

Hi !


I need your help. I did a point cloud with PROC GPLOT and i get something like this graph (RED POINTS) but i want something like BLUE points, that is to say to order the points by his value, small values ​​are displayed first.


I tried to sort the dataset  by value but it don't work and i do not understand why.


Do you have any idea ?


Than you very much! 


SAS graph.PNG

Super User
Super User
Posts: 9,799

Re: PROC GPLOT observations order

Posted in reply to luciacossaro

Post some test data in the form of a datastep, follow this if need:


Also post the code you are running.  Also move to proc sgplot as that is far more powerful and simple, gplot is very old.

Super User
Posts: 13,876

Re: PROC GPLOT observations order

Posted in reply to luciacossaro


Provide Code.


Your entire description makes little sense. The "order" of graph like that depends on the values of the X and Y axis variable values. Since Proc GPLOT plot statements only deal with numeric values they will always appear in ascending order from left to right (x axis), bottom to top unless you provide an explicit AXIS statement to change the order using an Order= option.


With the magnitude of changes you imply with the drawn lines not being consistent, I suspect you have to completely change your X axis variable values to get the "order" you want.


You did not help by not showing any axis value labels for the X axis.

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation