sas - Create graph using PROC GPLOT with forced sorting for time -


I am trying to create a graph in the SAS Enterprise Guide. The data I am plotting is as follows:

  col1 col2 col3 1 12:00 20 2 13:00 30 3 14:00 15. . . . . . 25 24:00 90 26 01:00 25 27 02:00 45. . . . . 36 11:00 35   

I need call 2 on the horizontal axis and col3 on the vertical axis. Col1 is the reference to call 2 (time value). Problem 2 col2 is being sorted if there is a way I can force sorting for col2, I think it will work what it is i have

  SYMBOL1 INTERPOL = add HEIGHT = 10pt VALUE = any line = 1 WIDTH = 2 cv = _STYLE_; SYMBOL2 INTERPOL = plus height = 10pt VALUE = none LINE = 1 WIDTH = 2 cv = _STYLE_; Legend 1 frame; Axis1 STYLE = 1 WIDTH = 1 MINOR = Any order = 0 to 200 by 10; Axis2 STYLE = 1 WIDTH = 1 ORDER = 0 to 36 to MINOR = (NUMBER = 1); Title; TITLE1 "test_graph"; Foot Note; PROC GPLOT data = input_data; PLOT col2 * col3 / VAXIS = AXIS1 HAXIS = AXA 2 frame LHREFF = 34 Charge = Black HFF = 0 to 36 1 Legend = Legend 1; Run; QUIT;   

Also I tried to add the following statement to sort, but it does not work.

  order = (12: 00,13: 00,14: 00, ...... 23: 00,0: 00,1: 00,2: 00, ... .11: 00)   

Please advise.

Thanks

Used the code below and it works fine proc sgplot data = input_data; Xaxis value = ("12:00" "13:00" "14:00" ...... "23:00" "0:00" "1:00" "2:00" .... " 11:00 ") label =" time "; Yaxis integer value = (0 to 200 by 10) label = "numb"; Series x = cola2 y = coal3; Run;

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -