GPLOT - issues with the x axis values

Reply
Frequent Contributor
Posts: 129

GPLOT - issues with the x axis values

Hi,

I am using GPLOT to show the year in x axis and values in y axis... I am also grouping it to show individual charts (by segment). and saving it in PDF file

my code is generating approx 24 graphs, all of them are okay except for one.

In one of the chart I have values for year 2010 and 2011 but the graph is displaying year in decimal, like this (with values for 2010.1 and 2011.1 only)

2010.1   2010.2  2010.3  2010.4........ 2011.1

but for this graph I have only 2010 and 2012 values for the year... interestingly in HTML view the graph comes okay, it's only the PDF where I have issues.

here is portion of the code

PROC GPLOT DATA = WORK.Table

NOCACHE ;

PLOT VOLUME * YR  /

  VAXIS=AXIS1

  HAXIS=AXIS2

FRAME;

  BY SEGMENT;

please advice

Thanks

Super User
Posts: 17,784

Re: GPLOT - issues with the x axis values

have you tried applying a format to the variable?

ie format yr 8.; in your proc gplot?

Super User
Posts: 10,483

Re: GPLOT - issues with the x axis values

The culprit could also be in the AXIS2 definition. What does that look like?

Ask a Question
Discussion stats
  • 2 replies
  • 238 views
  • 0 likes
  • 3 in conversation