Data visualization with SAS programming

GCHART - Raxis scale

Reply
Frequent Contributor
Posts: 78

GCHART - Raxis scale

I am using following axis definition :-

AXIS2 LABEL=('Hour') ORDER=(0 TO 23 BY 1)              

      VALUE=(H=3.0 A=0 R=0 C=BLACK);                   

                                                       

AXIS4 LABEL=(H=3.0 A=90 R=0 "Avg. % CPU")              

      ORDER=(0 TO 100 BY 10) offset=(0,0) style=0;    

proc Gchart data=all_rec_out(where=(Distname="&distname"));  

format date Date7. ;                                         

VBAR3D Hour / DISCRETE TYPE=SUM SUMVAR=AVGPCT1               

              FRAME                                          

              AUTOREF                                        

              RAXIS=AXIS4                                    

              CAXIS=BLACK                                    

              MAXIS=AXIS2                                    

              MIDPOINTS=0 TO 23 BY 1                         

              VREF=(&thacpu &thmcpu)                         

              LEGEND=LEGEND1 ;                              

However on some of the charts the RAXIS is not scaling like 10,20,30,40 ---100 instead it's 21.99,42.66 etc ...Anybody has idea how i can insure not to have those 21.99 etc instead on RAXIS(vertical) has 10,20,30 forced...?

Grand Advisor
Posts: 10,211

Re: GCHART - Raxis scale

First step:

Proc Goptions Axis; run;

To see what the actual full current definition of the statement may be at the time of execution as expected.

You might need to post data that recreates the problem. If it doesn't do this consistently for the same data values then I would look the rest of your macro environment.

Frequent Contributor
Posts: 78

Re: GCHART - Raxis scale

Here's the output of the GOPTIONS axis ;

  21        +              PROC GOPTIONS AXIS; RUN;

  SAS/GRAPH
SOFTWARE OPTIONS AND PARAMETERS

  (EXECUTING IN
PROGRAM SYSIN ENVIRONMENT)

  NOACCESSIBLE                 CREATE ACCESSIBLE GRAPHS

  NOADMGDF                     GDDM DRIVER OUTPUT AN
ADMGDF FILE

  ALTDESC                      ENABLE THE USE OF THE
PROC DESCRIPTION FOR DEFAULT ALT TEXT

  ASPECT=                      ASPECT RATIO
(WIDTH/HEIGHT) FOR SOFTWARE CHARACTERS

  NOAUTOCOPY                   AUTOMATIC HARD COPY AFTER
DISPLAY

  NOAUTOFEED                   AUTOMATIC PAPER FEED AFTER
PLOT

  AUTOSIZE=ON                  CHANGE CHARACTER CELL SIZE TO
PRESERVE DEVICE CATALOG ROWS AND COLUMNS


BINDING=DEFAULTEDGE        
BINDING EDGE

  BORDER                       DRAW A BORDER AROUND
DISPLAY OR PLOT

  CBACK=WHITE                  BACKGROUND COLOR

  CBY=                         BY LINE COLOR

  NOCELL                       HARDWARE CHARACTERS MUST
BE ON CELL BOUNDARIES

  CHARACTERS                   USE HARDWARE CHARACTERS

  CHARTYPE=                    DEFAULT HARDWARE FONT

  CIRCLEARC                    USE HARDWARE CIRCLE/ARC
GENERATOR

  NOCOLLATE                    COLLATE OUTPUT

  COLORS=( BLACK
RED GREEN BLUE CYAN MAGENTA GRAY PINK ORANGE BROWN YELLOW BISQUE CORAL LIME
MAROON DARKGRAY DEEPPINK DIMGRAY NAVY OLIVE PERU PLUM GOLD THISTLE HOTPINK
INDIGO KHAKI LAVENDER PURPLE SIENNA SILVER SKYBLUE TAN TEAL TOMATO VIOLE

                               DEFAULT COLOR
LIST

  CPATTERN=                    DEFAULT PATTERN COLOR

  CSYMBOL=                     DEFAULT SYMBOL COLOR

  CTEXT=BLACK                  DEFAULT TEXT COLOR

  CTITLE=                      DEFAULT TITLE, FOOTNOTE
AND NOTE COLOR

  DASH                         USE HARDWARE DASHED
LINE GENERATOR

  DASHSCALE=                   DASH PATTERN SCALE FACTOR

  DELAY=                       ANIMATION DELAY TIME IN 100THS OF
A SECOND

  DEVADDR=                     IBM DEVICE ADDRESS, QNAME,
OR NODE NAME

  DEVICE=JAVA                  GRAPHICS OUTPUT DEVICE


DEVMAP=DEFAULT             
OUTPUT CHARACTER MAP FOR HARDWARE TEXT

  DISPLAY                      DISPLAY GRAPH ON DEVICE


DISPOSAL=NONE                IMAGE
ANIMATION DISPOSAL METHOD

  DRVINIT=                     HOST COMMAND EXECUTED
BEFORE DRIVER INITIALIZATION

  DRVTERM=                     HOST COMMAND EXECUTED
AFTER DRIVER TERMINATION

  NODUPLEX                     DUPLEX PRINTING

  NOERASE                      ERASE GRAPH UPON
COMPLETION

  EXTENSION=                   DRIVER PREFERRED FILE
EXTENSION

  NOFASTTEXT                   USE QUICKER, LESS PRECISE,
INTEGER FONT RENDERING ROUTINES; GENERALLY UNSUITABLE FOR MULTIPLE DEVICE OR
TEMPLATED REPLAY SITUATIONS.

  FBY=                         BY LINE FONT

  FCACHE=3                     NUMBER OF SOFTWARE FONTS
TO KEEP IN MEMORY


FILECLOSE=GRAPHEND           CLOSE
OUTPUT FILE AT DRIVER TERMINATION OR END OF EACH GRAPH

  FILEONLY                     FILE IS DEFAULT OUTPUT
DESTINATION

  FILL                         USE HARDWARE RECTANGLE
FILL GENERATOR

  FILLINC=1                    FILL INCREMENT TO USE ON
SOFTWARE POLYGON FILLS.


FONTRES=NORMAL               USE
DECREASED RESOLUTION FONTS (SASHELP.DRAFT).

  FTEXT=SWISSB                 DEFAULT TEXT FONT

  FTITLE=                      DEFAULT FONT FOR FIRST
TITLE

  FTRACK=TIGHT                 DEFAULT SPACING BETWEEN
CHARACTERS FOR SUPPLIED BITSTREAM FONTS.


GACCESS='GSASFILE'         
OUTPUT FORMAT FOR GRAPHICS STREAM

  GCLASS=G                     IBM3287 SYSOUT CLASS

  GCOPIES=(1,
20)              NUMBER OF OUTPUT COPIES


GDDMCOPY=FSCOPY              GDDM
DRIVER HARD COPY TYPE


GDDMNICKNAME=                GDDM
NICKNAME

  GDDMTOKEN=                   GDDM TOKEN

  GDEST=LOCAL                  IBM3287 SYSOUT DESTINATION

  GEND=                        BUFFER TERMINATION
STRING

  GEPILOG=                     DEVICE TERMINATION STRING

  GFORMS=                      IBM3287 SYSOUT FORMS CODE


GOUTMODE=APPEND              GOUT
CATALOG MODE: APPEND OR REPLACE

  GPROLOG=                     DEVICE INITIALIZATION
STRING


GPROTOCOL=SASGPASC         
GRAPHICS PROTOCOL CONVERTER DRIVER NAME

  GRAPHRC                      SAS/GRAPH IS TO ISSUE
STEP CONDITION CODES AT EXIT

  GSFLEN=4096                  LENGTH OF GRAPHICS STREAM
FILE RECORDS


GSFMODE=REPLACE              GRAPHICS
STREAM FILE ACCESS MODE

  GSFNAME=                     GRAPHICS STREAM FILENAME

  NOGSFPROMPT                  ADDS DEVICE DRIVER PROMPTS TO
GSASFILE

  GSIZE=                       NUMBER OF LINES IN
GRAPHICS DISPLAY AREA

  GSTART=                      BUFFER INITIALIZATION STRING


GUNIT=PERCENT              
DEFAULT TEXT UNITS

  GWAIT=                       TIME DELAY AFTER
GRAPHICS DISPLAY


GWRITER=SASWTR             
IBM3287 SYSOUT WRITER NAME


HANDSHAKE=NONE               ASCII
DEVICE HANDSHAKE PROTOCOL

  HBY=                         BY LINE HEIGHT

  HORIGIN=                     HORIZONTAL OFFSET TO GRAPH
ORIGIN

  HPOS=                        CHARACTER CELLS PER
LINE

  HSIZE=9.3746
IN              HORIZONTAL PLOT SIZE IN
INCHES

  HTEXT=2                      DEFAULT TEXT HEIGHT

  HTITLE=4                     DEFAULT HEIGHT OF FIRST
TITLE LINE

  IBACK=                       PATH OR FILEREF TO
BACKGROUND IMAGE

  IMAGEPRINT                   SPECIFIES WHETHER IMAGES
WILL BE OUTPUT

  IMAGESTYLE=TILE              BACKGROUND IMAGE STYLE: FIT OR
TILE

  INTERPOL=                    DEFAULT SYMBOL
INTERPOLATION

  ITERATION=                   ITERATION OF ANIMATION


NONINTERLACED                IMAGE
INTERLACE SELECTION


KEYMAP=DEFAULT               INPUT CHARACTER MAP FOR HARDWARE
AND SOFTWARE TEXT

  LFACTOR=1                    HARDWARE LINE THICKNESS
FACTOR

  OFFSHADOW=(0.0625
IN., -0.0625 IN.)

                               X, Y OFFSET FOR
DROPSHADOWS

  PAPERDEST=                   PAPER DESTINATION SELECTION

  PAPERFEED=                   AMOUNT OF PAPER TO FEED ON
DRUM PLOTTERS

  PAPERLIMIT=                  PHYSICAL WIDTH OF THE
PLOTTING PAPER

  PAPERSIZE=                   PAPER SIZE SELECTION

  PAPERSOURCE=                 PAPER SOURCE SELECTION


PAPERTYPE='PLAIN'            PAPER
TYPE SELECTION


PENMOUNTS=16777215         
NUMBER OF PENS/COLORS TO BE USED

  NOPENSORT                    SORT PLOTTER COLORS

  PIEFILL                      USE HARDWARE PIE FILL
GENERATOR

  NOPCLIP                      SPECIFIES WHETHER A CLIPPED
POLYGON IS STORED WITH THE GRAPH IN THE CATALOG ENTRY IN ITS CLIPPED OR
UNCLIPPED FORM.

  POLYGONCLIP                  ALLOWS POLYGONS WITH A DEVICE
DEPENDENT PATTERN TO BE CLIPPED.

  POLYGONFILL                  USE HARDWARE POLYGON FILL GENERATOR

  POSTGEPILOG=                 DATA TO SEND AFTER THE GEPILOG

  POSTGRAPH=                   HOST COMMAND EXECUTED AFTER
EACH GRAPH

  POSTGPROLOG=                 DATA TO SEND AFTER THE GPROLOG

  PPDFILE=                     PRINTER PRODUCT
DESCRIPTION FILE

  PREGEPILOG=                  DATA TO SEND BEFORE THE
GEPILOG

  PREGRAPH=                    HOST COMMAND EXECUTED
BEFORE EACH GRAPH

  PREGPROLOG=                  DATA TO SEND BEFORE THE GPROLOG

  NOPROMPT                     ALLOW/DISALLOW USER
PROMPTING BY DEVICE DRIVER


PROMPTCHARS='000A010D05000000'X

                               TERMINAL CONTROL
CHARACTERS


RENDER=MEMORY              
RENDERING ACTIVE: DO NOT CHECK FOR EXISTING FONT. ADD TO FONT DEFINITION
IN MEMORY. DO NOT WRITE MODIFIED FONT BACK TO DISK.


RENDERLIB=WORK             
LIBRARY TO STORE PRE-RENDERED SAS FONTS.

  REPAINT=                     NUMBER OF PASSES MADE IN
DRAWING A GRAPH

  NOREVERSE                    REVERSE ORDER OF OUTPUT


ROTATE=LANDSCAPE           
ROTATE PLOT NINETY DEGREES

  SIMFONT=                     SOFTWARE FONT TO USE AS
SIMULATED HARDWARE FONT.

  SPEED=                       PLOTTER PEN SPEED

  NOSWAP                       SUBSTITUTE BLACK FOR
WHITE


SWFONTRENDER=DEFAULT       
CONTROL SOFTWARE FONT RENDERING

  SYMBOL                       USE HARDWARE SYMBOL
GENERATOR


TARGETDEVICE=              
INTENDED HARD COPY DEVICE

  TRANSPARENCY                 IMAGE BACKGROUND TRANSPARENCY

  TRANTAB=                     TERMINAL TRANSLATE TABLE

  UCC='00'X                    DRIVER SPECIFIC OPTION
FLAGS

  NOUSERINPUT                  ENABLE USER INPUT FOR IMAGE
ANIMATION

  NOV6COMP                     SELECTS MAXIMUM VERSION 6
COMPATIBILITY

  VORIGIN=                     VERTICAL OFFSET TO GRAPH
ORIGIN

  VPOS=                        CHARACTER CELLS PER
COLUMN

  VSIZE=6.2500
IN              VERTICAL PLOT SIZE IN
INCHES

  XMAX=9.3746
IN               MAXIMUM HORIZONTAL PLOT
SIZE IN INCHES

  XPIXELS=900                  MAXIMUM NUMBER OF HORIZONTAL
PIXELS

  YMAX=6.2500
IN               MAXIMUM VERTICAL PLOT
SIZE IN INCHES

  YPIXELS=600                  MAXIMUM NUMBER OF VERTICAL
PIXELS

  AXIS2 VALUE=(
HEIGHT=3 ANGLE=0 ROTATE=0 COLOR=BLACK ) LABEL=( 'HOUR' ) ORDER=(0 TO 23 BY 1) ;

  AXIS4 OFFSET=(0 ,
0 ) STYLE=0 LABEL=( HEIGHT=3 ANGLE=90 ROTATE=0 'AVG. % CPU' ) ORDER=(0 TO 100
BY 10) ;

  NOTE: THE
PROCEDURE GOPTIONS USED THE FOLLOWING RESOURCES:

        CPU     TIME -         00:00:00.00

        ELAPSED
TIME -         00:00:00.00

        EXCP
COUNT   - 4

        TASK  MEMORY - 7118K (4K DATA, 7114K PROGRAM)

        TOTAL
MEMORY - 47988K (17184K DATA, 30804K PROGRAM)

      
TIMESTAMP    - 3/16/2015 3:10:48
AM

  NOTE: THE ADDRESS
SPACE HAS USED A MAXIMUM OF 896K BELOW THE LINE AND 51512K ABOVE THE LINE.

While data i have it very much variable however here's what it look like ...

DISTNAME       DATE    HOUR     MAXPCT

                                      

XXXXXXXX    15MAR15      0     0.22000

XXXXXXXX    15MAR15      1     0.23000

XXXXXXXX    15MAR15      2     0.30000

XXXXXXXX    15MAR15      3     0.19000

XXXXXXXX    15MAR15      4     0.27000

XXXXXXXX    15MAR15      5     0.20000

XXXXXXXX    15MAR15      6     0.27000

XXXXXXXX    15MAR15      7     0.34000

XXXXXXXX    15MAR15      8     0.49000

XXXXXXXX    15MAR15      9     0.31000

XXXXXXXX    15MAR15     10     0.36000

XXXXXXXX    15MAR15     11     0.61000

XXXXXXXX    15MAR15     12     0.37000

XXXXXXXX    15MAR15     13     0.37000

XXXXXXXX    15MAR15     14     0.32000

XXXXXXXX    15MAR15     15     0.31000

Super Contributor
Posts: 291

Re: GCHART - Raxis scale

does the response axis data have values outside of the 0 to 100 range?

Frequent Contributor
Posts: 78

Re: GCHART - Raxis scale

NO as I see

Ask a Question
Discussion stats
  • 4 replies
  • 405 views
  • 0 likes
  • 3 in conversation