- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sorry if this is the wrong location. It's confusing to figure out which one is the correct forum, but I want to rename the y-axis of the plot that is produced by
proc plot;
plot energy_weekday * temp = 'W'
energy_weekend * temp = 'S'
/overlay;
to "energy" (right now, the plot shows "energy_weekday" as the y-axis).
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Put a label statement into the code
proc plot;
plot energy_weekday * temp = 'W' energy_weekend * temp = 'S'/overlay;
label energy_weekday='Energy';
run;
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Put a label statement into the code
proc plot;
plot energy_weekday * temp = 'W' energy_weekend * temp = 'S'/overlay;
label energy_weekday='Energy';
run;
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Haven't used Proc PLOT in over 30 years.
Is there a reason you don't want a nicer looking plot or is this intended for line-printer output?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is what my team has been doing since before I joined. What do you recommend instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
With any version of SAS since 9.1 I would be using Proc SGPLOT or SGPANEL for plots.
You should have the SASHELP.Class data set available to test the following code which produces two similar plots:
proc plot data=sashelp.class; plot weight*height /vpos=25 ; run; proc sgplot data=sashelp.class; scatter x=height y=weight/markerattrs=(color=blue) transparency=.5; run;
I used the transparency setting to make the colors in the SGPLOT output a bit transparent so when multiple values overlay that is shown by a more intense color fill instead of the letter B in the Plot result.
Sgplot adds multiple types of graphs, quite a bit more appearance options and will create pretty nice appearing output when sent to document formats like PDF and RTF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the late reply, but I appreciate the info. Is it something that is covered in the courses? Thanks.