The code below works fine, however, I would like the lines in each panel to be a different color. Do I need to annotate to get that result?
GRX is a formatted numeric value and has four levels (one panel for each value of GRX).
Pressure is an integer values ranging from zero to a maximum of around 30. Each value if ID is a time series for a different set of measurements.
First you will want to combine the SCATTER and SERIES statements:
series x= MONTH y= pressure / group=id lineattrs=(thickness=1) markers markerattrs=(size=6pt);
If you want all of the lines in each cell to be same color, add GROUPLC=trt (the PANELBY variable) to the SERIES statement. If you want each line in the panel to have a unique color, create a new variable with unique values (e.g. 1, 2, 3, etc.) and assign it to the GROUPLC option.
Hope this helps!
First you will want to combine the SCATTER and SERIES statements:
series x= MONTH y= pressure / group=id lineattrs=(thickness=1) markers markerattrs=(size=6pt);
If you want all of the lines in each cell to be same color, add GROUPLC=trt (the PANELBY variable) to the SERIES statement. If you want each line in the panel to have a unique color, create a new variable with unique values (e.g. 1, 2, 3, etc.) and assign it to the GROUPLC option.
Hope this helps!
This helps but the colors are not quite correct. The line colors are fine (I want alternating blue and green in each panel) however, the markers are mixed in each panel. Most match the line colors but some do not.
What am I missing?
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.
Ready to level-up your skills? Choose your own adventure.