BookmarkSubscribeRSS Feed
fredbell
Fluorite | Level 6
Hello all

Can anyone explain how to change vertical not horizontal?

Fri, Oct, 6
to
F
r
i
,
O
c
t
,
6


I'm losing all the dates on the graph, my data range was October 1, 16 but on the graph it only shows the first and last day of month.


proc gplot data = Total_callshandled_by_day template=BarTableHorz;
title 'Calls Handled throught Time';
plot calls_handled*date;
symbol v = triangle I = j ci=blue
w = 1 ;
label Date = ‘Date’;
run;
quit;

Fred

Message was edited by: fredbell Message was edited by: fredbell
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
The AXIS statements allow the use of the ANGLE and ROTATE suboptions to alter how AXIS text and AXIS value text can be made to fit. That documentation is here:
http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#axischap.htm

Also, for numeric variables, SAS/GRAPH will calculate the intervals that it needs to show unless you provide other instructions (again, with an AXIS statement) or with other options (such as in your plot or action statement).

Are you also intending or attempting to REPLAY your GPLOT output??? Your use of TEMPLATE= is unusual and normally a specific template would be seen when using PROC GREPLAY -- which I do not see in your code. So I wonder whether your code has any messages in the log that are also causing issues.

cynthia
GraphGuy
Meteorite | Level 14
Here's a specific example that might help...

-----

axis1 value=(height=8pt angle=90);

proc gplot data = Total_callshandled_by_day template=BarTableHorz;
title 'Calls Handled throught Time';
plot calls_handled*date / haxis=axis1;
symbol v = triangle I = j ci=blue
w = 1 ;
label Date = ‘Date’;
run;
quit;

-----

SAS/Graph tries to make the text values on the axes "fit", but you can control the angle of the text (or rotate of the characters) manually ... and if you make it fit, then gplot won't have to. And you can generally make better judgement calls as to what "looks better". Sometimes you also have to make the text smaller to get it to fit.

One caveat - sometimes, graph will do both what you tell it, and also apply it's fitting algorithm (if it 'thinks' the text values won't fit) and you'll end up with upside-down stacked letters. That is fixed in v9.3 (internal tracking number S0176883), but in v9.2 you might have to make the text smaller, so that gplot knows it will fit comfortably, and not have it's automatic fitting-algorithm kick in.

Another caveat - some of the axis text rotate/angle stuff might only have "partial support" in dev=activex and dev=java (which are the defaults if you're using EG or Stored Processes). I would recommend device=png.

-----

Message was edited by: Robert Allison @ SAS Message was edited by: Robert Allison @ SAS
fredbell
Fluorite | Level 6
Thanks so much Robert.

Fred Message was edited by: fredbell
ballardw
Super User
Probably not needed as a response to the original post at this time but the FORMAT associated with the axis variable also would be a place to look to increase readability especially with dates. The example looks like a MMDDYY10. or MMDDYY8. would have fit and been readable. Depending on the number of values they may have then even appeared horizontally.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 4 replies
  • 810 views
  • 0 likes
  • 4 in conversation