BookmarkSubscribeRSS Feed
Statsconsultancy
Fluorite | Level 6
I am trying to draw a square with coordinates (-1,-1), (1,-1), (-1,-1) and (1,1). I thought i can use VREF = -1 1 and HREF= -1 1. But these give me extra lines that I do not need. Basically, i will like to know how to draw a horizontal line passing through Y=1, beggining at X=-1 and ending at X=1. Or how can I draw a verical line passing through X=1, beggining at Y=-1 and ending at Y=1.
2 REPLIES 2
data_null__
Jade | Level 19
[pre]
data a;
infile cards dsd;
input x y;
cards;
-1,-1
-1,1
1,1
1,-1
-1,-1
;;;;
run;
goptions reset=all;
goptions hsize=6in vsize=6in;
symbol i=join c=red w=2;
proc gplot;
plot y*x;* / noaxis noframe;
run;
quit;
[/pre]
ChrisNZ
Tourmaline | Level 20
Or if you need to plot a square on top of existing data:



data ANNO;
retain XSYS YSYS '2' COLOR 'red';
FUNCTION='move'; X=12; Y=12; output;
FUNCTION='draw'; X=11; Y=12; output;
FUNCTION='draw'; X=11; Y=11; output;
FUNCTION='draw'; X=12; Y=11; output;
FUNCTION='draw'; X=12; Y=12; output;
run;
proc gplot data=SASHELP.CLASS annotate=ANNO;
plot AGE*AGE;* / noaxis noframe;
run;
quit;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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