Hi all, I have a sgplot in a macro that is looped to various filters in my dataset. This all works great, except for when one of the filters has (almost) no data. Here's the macro: %MACRO PLOT_WL(PHASE);
ods graphics / noborder width=100%;
proc sgplot data=input_workload_graph noborder;
where upcase(fase)=upcase(&PHASEASE);
vline date / response=amount_2wd lineattrs=(color=lightgrey thickness=3pt pattern=solid) legendlabel="2 workdays";
vline date / response=amount_3wd lineattrs=(color=orange thickness=3pt pattern=solid) legendlabel="3+ workdays";
xaxis display=(nolabel);
yaxis display=(nolabel);
keylegend / noborder;
run; I have two questions about the options for the axes: The first problem is that when there is no data to display the line for 0 is not at the x-axis but in the centre of the graph. How do I get it to align with the x-axis? I do not want to set 0 as a fixed minimum as for some filters this wouldn't apply. See below for how it looks now. Output now (first question)2. If the filter results in smaller numbers, the y-axis displays decimal numbers. I'd like the y-axis to increment in whole numbers. I tried setting the valuesformat to this but this just displays the same 6 points on the y-axis pictured below but rounded to either 0 or 1. Ideally, the graph below only has two y-axis points. The 0 and 1. Output now (second question) Thanks in advance for the help!
... View more