The SAS Output Delivery System and reporting techniques

discontinued horizontal axis in a line plot

Reply
N/A
Posts: 0

discontinued horizontal axis in a line plot

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
Super Contributor
Posts: 291

Re: discontinued horizontal axis in a line plot

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
N/A
Posts: 0

Re: discontinued horizontal axis in a line plot

Thank you Bill for your suggestions.
PROC Star
Posts: 1,564

Re: discontinued horizontal axis in a line plot

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
Ask a Question
Discussion stats
  • 3 replies
  • 194 views
  • 0 likes
  • 3 in conversation