Data visualization with SAS programming

Dates getting changed between data and graph?

Accepted Solution Solved
Reply
Contributor
Posts: 42
Accepted Solution

Dates getting changed between data and graph?

Hi everyone-

I'm having issues with my date values changing when I run a proc gplot or gchart.

Here is a simple example with output I dervied that illustrates the problem.  My dates are only 1/1/2012 and 2/1/2012, yet when I graph it 1/3/2012, 1/13/2012, 1/23/2012, and 2/2/2012.  Does anyone know why this is happening? I only want two dates showing, the only two in the data set 1/1/2012 and 2/1/2012 and ideally in the mmyyd7. format. 

thank you!

data t2;

format breakout $15. ;

input breakout $ value date:mmddyy10.;

datalines;

group1 41 1/1/2012

group1 25 2/1/2012

group2 15 1/1/2012

group2 7  2/1/2012

group3 63 1/1/2012

group3 21 2/1/2012

group4 9  1/1/2012

group4 32 2/1/2012

;

run;

proc gchart data=t2;

format date mmddyy10.;

vbar3d date /sumvar=value subgroup=breakout

     width=9

     space=4

     cframe=gray;

run;

quit;

graph.JPG


Accepted Solutions
Solution
‎03-23-2012 05:05 PM
SAS Super FREQ
Posts: 925

Dates getting changed between data and graph?

GCHART is trying to bin your time data. Just use the DISCRETE option on the VBAR3D statement, and you'll get what you want.

Hope this helps!

Dan

View solution in original post


All Replies
Solution
‎03-23-2012 05:05 PM
SAS Super FREQ
Posts: 925

Dates getting changed between data and graph?

GCHART is trying to bin your time data. Just use the DISCRETE option on the VBAR3D statement, and you'll get what you want.

Hope this helps!

Dan

Contributor
Posts: 42

Dates getting changed between data and graph?

That did it Dan!

Thanks a ton!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 183 views
  • 0 likes
  • 2 in conversation