10-06-2015 10:46 AM - edited 10-06-2015 10:47 AM
I am trying to create a time series plot that includes dates and hours. I want to show the trend by hour and by date.
Currently I have used proce template with data lattice to do this:
define statgraph Day_Hour;
layout gridded / border=false ;
layout datalattice columnvar=date / headerlabeldisplay=value border=false columnheaders=bottom columnaxisopts=(label="Date" )
layout prototype /walldisplay=(fill) ;
seriesplot x=hour y=count /display=(markers) break=false markerattrs=graphdata1(symbol=circlefilled size=9)
Hwoever, I want the trend line to connect across days and with data lattice it breaks between each day. I want the last hour of September 29th to connect with the first hour of Sepetmber 28th.
Do you know how I can get my trend line to connect, but still show dates and hours.
10-06-2015 12:52 PM
Do you really want " I want the last hour of September 29th to connect with the first hour of Sepetmber 28th."
Did you mean " I want the last hour of September 28th to connect with the first hour of Sepetmber 29th."?
For continuous plots involving date and time I would ensure that I had a SAS date time variable.
You could make a datetime variably using the DHMS function:
DT = DHMS(date, hour,0,0);
in a data step.