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
SAS Super FREQ
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
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1122 views
  • 0 likes
  • 2 in conversation