I'm more familiar with SGPLOT than GPLOT so
1. How do I set a reference line on the y-axis?
2. How do I change the color for values at or above a certain level?
Don't use GPLOT. SGPLOT is so much better.
First question is why Gplot?
Might help to show your existing code.
VREF=value or value list will draw reference lines perpendicular to the vertical axis (i.e. at Y axis values)
There are multiple other options to work with the VREF: CVREF to set colors, LVREF to set line type. WVREF to set line widths, and then a similar set for AUTOVREF if you want a reference line at each axis tick mark.
HREF and similar for the Horizontal axis.
Where a value list is used it looks like VREF= 300 1000 1500 to set 3 reference lines at Yaxis values of 300, 1000 and 1500.
It has been a long time since I used GPLOT much (think last century). If I wanted to change the color of a line plot based on a value then I would set a variable to different values for different ranges and match those values to SYMBOL statements. The kicker is going to be extra coding to avoid gaps if doing a line chart and Bubble charts would be a nightmare if you want to color only part of a bubble.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: