I am using GTL and SGRENDER to plot the linear and Logarithmic graphs on the same page. Since, I am having zero values Logarithmic axis can not be plotted. I can see the note from the log NOTE: Log axis cannot support zero or negative values in the data range.
The axis type will be changed to LINEAR.
Since I need these values for plotting linear values I can not delete these values from the dataset. Is there anyway we could force
to use log scale or subset the data in the GTL code for the log plot? Please see the test code below.
Thanks Dan. I have created a new variable by setting the <=0 values to missing. Unfortunately, that did not like it. I got a warning message in the log. The ScatterPlot statement named 'scat1' will not be drawn because one or more of the required arguments were not supplied.
hi ... so this is not a direct answer to the question, but just another way to look at the weight change data
if you want a display of logs of weight change, you know that you'll have to 'throw away' the zero and negative numbers
so, here's a non-GTL way of looking at the same data that looks slightly similar to your GTL plot
weight change is always 0 or positive
gain is blue, lose is red
this gives a 'log look' at both weight gain and weight loss
rearranging data ... +/0 in one group, - in another
set sashelp.bweight (keep=visit m_wtgain);
when (m_wtgain ge 0) do; group=1; lvisit=3*visit; end;
when (m_wtgain lt 0) do; group=2; lvisit=3*visit+1; end;
lm_wtgain = abs(m_wtgain);
Thanks Mike for your response. I have no issue with Non-GTL language which we had it already. I am using the new SG procedures and GTL language totake the advatange of the Graphics quality.
Dan, I see for some reason my early response was not posted properly. The solution you proposed did not work.
Thanks for all your replies,