11-25-2016 09:41 AM
Using the attached data, I am plotting the X, Y values w.r.t. Dates. I am using the following code:
proc sgplot data=mydata; series x=x y=y / group=Date break; yaxis grid; run;
And this is what plot looks like:
Now question is...
in the above resulting plot I can not identify the 4 plots clearly.
Therefore, I want to do this:
11-25-2016 10:12 AM
Please post test data as a datastep in the body of the post, attached xlsx files are a security risk. With regards to your questions:
What you talk about is jittering. Here are some examples:
You could also manipulate your data, i.e. each group gets +6 added to the result, more than the previous group. Do this in a datastep before the sgplot.
To set the size of the lines, you use
Where x is the width.
11-25-2016 10:37 AM
11-25-2016 10:57 AM
Its not concerns, its statutory company policy, and security sense for anyone. If you need to post test data, do so as a datastep (to show structure) and only a few of the obsevations necessary to illustrate the problem. You can do this by following this post:
11-28-2016 02:59 AM - edited 11-28-2016 03:17 AM
Hi KSharp, Thanks for your suggestion. I already tried it. Unfortunately, this way the outcome is in 4 panels. But what I want that all the 4 plots in one panel, as in my question above, but where Date=6Jul16, the plot should be shifted up on Y-axis by 6000 in each row.
Date=6Jul16 and MeaNo=1,
the new_Y= -40075+6000 = -34075
Date=6Jul16 and MeaNo=2,
the new_Y= -39875+6000 = -33875
and so forth.
I am thinking, this way we can see some shift in the plot and difference between two dates (29Jun and 6Jul).
And I tried this..
PROC SQL; create table mydata as SELECT *, CASE WHEN Date="06JUL2016"d THEN (y+6000) ELSE y END AS Y_Plus_6K FROM mydata; QUIT; proc sgplot data=mydata1; series x=x y=Y_Plus_6K / group=Date transparency=0.6 LINEATTRS=(thickness=2) break; yaxis grid; run;
But this looks horrible. May be you could suggest me something better.
Thanks once again.