Sample 24936: Represent tick mark values on an axis of a GPLOT with a special symbol
/*******************************************************************************/
/* This program uses PROC GFONT to create the square root symbol within */
/* a user defined font, then uses the ANNOTATE facility to place the symbol on */
/* the Haxis of a GPLOT. You must assign a directory to the libref GFONT0 in */
/* order to create a font library. */
/*******************************************************************************/
goptions reset=all cback=white border gunit=pct htext=3;
libname gfont0 'font directory';
data mymarker;
length ptype char lp $ 1;
input char ptype x y segment lp;
datalines;
A V 0 34 1 L /* square root sign */
A V 4 34 1 L
A V 20 0 1 L
A V 30 64 1 L
A V 80 64 1 L
;
proc gfont data=mymarker
name=mymarker
baseline=0
capline=64
charspacetype=none
filled
mwidth=80
nodisplay
resol=2
showroman;
run;
/*
proc gfont name=mymarker
height=6
nobuild
romfont=swiss
romht=3
romcol=red;
run;
*/
data a;
input real_x yvar;
datalines;
1 10
2 20
3 30
4 10
5 65
;
data anno;
length style text $8;
retain xsys '2' ysys '3' function 'label';
set a;
x=real_x; y=10; style='mymarker'; text='A'; size=1.75; position='8'; output;
x=real_x; y=10; style='swissL'; text=left(put(real_x,2.0)); size=1; position='9'; output;
run;
proc gplot data=a;
plot yvar*real_x / anno=anno haxis=axis1 vaxis=axis2;
symbol1 i=j v=dot c=blue;
axis1 value=none origin=( ,14)pct order=(1 to 5 by 1) offset=(5,5)pct label=none minor=none;
axis2 minor=none;
title1 h=5 pct 'Square Root of X';
run;
quit;

This program uses PROC GFONT to create the square root symbol within a user defined font, then uses the ANNOTATE facility to place the symbol on the Haxis of a GPLOT.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Axis
|
| Date Modified: | 2005-08-31 03:03:22 |
| Date Created: | 2004-11-11 11:08:03 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |