BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm using proc gplot to generate graphs by Item, location, x axis is time and y axis is amount, pretty basic graph.

And in the graph, I want to add a text box showing the value of "price" which is in my table, but I don't know how SAS could automatically create a text reflecting "price value" on each gragh.

Is it easy to do? or need to store the column of "price" into a macro variable?

Thank you so much in advance!
3 REPLIES 3
Cynthia_sas
Diamond | Level 26
Hi:
To add additional text to a SAS/GRAPH plot, you might need to consider using the ANNOTATE facility. Unless you put your price value into a TITLE or a FOOTNOTE, the ANNOTATE facility can place text onto a the graph image. These papers can give you some idea of how it works:
http://www.lexjansen.com/pharmasug/2007/tu/tu05.pdf
http://www.lexjansen.com/pharmasug/2006/handsonworkshops/hw03.pdf
http://www2.sas.com/proceedings/sugi31/239-31.pdf
http://www.lexjansen.com/pnwsug/2009/Atkinson,%20Mike%20-%20Customising%20SAS-GRAPH%20Charts%20with%...

cynthia
deleted_user
Not applicable
Thank you very much! one more question on bar chart:

I wanna show three 3 years of data for different products. When I use Goptions to define 3 color of bars (interpol=needle), it keeps overwriting 3 bars (colors) into 1 bar (color), how to spread 3 bars out on X axis for different products?

Thanks!
Cynthia_sas
Diamond | Level 26
Hi:
The GPLOT documentation has an example of plotting 3 variables that you may find very useful:
http://support.sas.com/documentation/cdl/en/graphref/61884/HTML/default/gplvrbl2-ex.htm

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 1893 views
  • 0 likes
  • 2 in conversation