BookmarkSubscribeRSS Feed
anurak
Fluorite | Level 6

I want to create a plot in GTL. The code I used is

proc template;

----

----

---

seriesplot x = var1 y=var1/group = grp1  name = "series"

discretelegand "series"

The problem I have is My group variable values occurs twice but with different values for var1 in y axis, so when I plot the graph the duplicate groups gets  same color even though they plotted separately. Is there any way to specify in template to consider those duplicates as independent and gets 2 different color for lines?

2 REPLIES 2
ballardw
Super User

The purpose of group is to make related items identified by the group option use the same settings.

You may have to reshape your data but you may require a separate seriesplot statment to use a different set of options. Possibly creating a second x and y variables only when the group variable wants a different color.


anurak
Fluorite | Level 6

When I try to plot using series plot in GTL, I am getting warnings because of missing data. Is there any options that I can use to ignore missing data instead of showing warnings in Log?. The code I used is

seriesplot x = xvar y = yvar/name="ser1";

seriesplot x=xvar1 y= yvar1/yaxis = y2 name = "ser2".

some of the yvar1 is missing.

warnings:  y=yavr1is invalid

Please let me know If there is any options to ignore missing value.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2219 views
  • 1 like
  • 2 in conversation