BookmarkSubscribeRSS Feed
cappertan
Calcite | Level 5

I have 3 numbers representing volume captured on these dates :

volume: 7703, 7759, 7814

rundate  : 1115, 1215, 0116

 

Volume is the Xaxis and Date is the Yaxis.

I have the following GPLOT statements:

goptions reset=symbol;
SYMBOL1 CV=BLUE VALUE=DOT H=1
I=JOIN CI=RED LINE=1 W=1;
*Write the plot;
proc gplot data= WORK.QC_TREND_WORKING;
plot volume * rundate ;
run;
quit;

When I run this I get the attached graph.

How do I get the dates/plots from spacing so far apart ?

 

Thanks

Cappertan

 


cappertan_Gplot_graph_example.jpg
2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

That is the default spacing.  You haven't provied any options, so it uses the default.  

http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#goptionschap.htm

 

You can change a lot of the options with the above.  I would suggest though that you move to sgplot or Graph Template Language.  Its far more robust and flexible, here you can find many examples:

http://blogs.sas.com/content/graphicallyspeaking/

ballardw
Super User

If the issue is spacing between your 'dates', it might help to actually use date values and date formats. 

 

GPLOT will fill the amount of space set to create  graphs. If your data is sparse and you do not want the graph to be so wide then use goptons to either change the HSIZE or HPIXELS values. Or specify a LENGTH for your Xaxis using an AXIS statement and associating the HAXIS gplot option with that defined axis.

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
  • 1107 views
  • 1 like
  • 3 in conversation