BookmarkSubscribeRSS Feed
deleted_user
Not applicable
hi friends,
I have a dataset having data for whole day. i want to plot data time vs volumn
now the problem is volumn are high only during few hours of day otherwise they are null,
these volumn are high from 8:00 to 8:20, from 9:30 to 10:00 and then 15:30 to 16:00
so i want to break x- axis and plot only during this periods.
so i wrote
axis2
ORDER="08:00"T TO "08:20"T BY minute5,"09:00"T TO "10:00"T BY minute5,"15:30"T TO "16:10"T BY minute5 ;

but i am not getting the required output. its show time for whole day evenly spaced.

i am getting warning as

WARNING: The intervals on the axis labeled ESTime are not evenly spaced.
WARNING: No minor tick marks will be drawn because major tick increments have been specified in uneven or unordered intervals.

any solutions or suggestions?

Regards
Avi
3 REPLIES 3
Bill
Quartz | Level 8
Avi;

I think your data might be better displayed with a vbar graph in proc gchart. Bar graphs are better for detecting values, line graphs are better for detecting trends. I expect that gchart will provide the axis break more naturally. Be sure to show a note somewhere indicating that null periods are not shown.

wd
deleted_user
Not applicable
Thank you Bill for your suggestions.
ChrisNZ
Tourmaline | Level 20
It depends on the device driver you are using.
[pre]
data t;
do t=0 to 24*60*60 by 5*60;
if ("08:00"T <=t<= "08:20"T) or ("09:00"T <=t<= "10:00"T) or ("15:30"T <=t<= "16:10"T) then v=t;
else v=0;
output;
end;
format t time.;
run;

axis2 ORDER="08:00"T TO "08:20"T BY minute5,"09:00"T TO "10:00"T BY minute5,"15:30"T TO "16:10"T BY minute5 ;
goption dev=win;
proc gplot data=t;
plot v*t/haxis=axis2;
run;
quit;
[/pre]
This works fine with WIN, PNG or GIF drivers, but not with activex, which likes doing things its own way.


Message was edited by: Chris@NewZealand

Argh, < playing up again

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1101 views
  • 0 likes
  • 3 in conversation