Data visualization with SAS programming

GPLOT HAXIS character defined limits options available?

Accepted Solution Solved
Reply
Contributor
Posts: 47
Accepted Solution

GPLOT HAXIS character defined limits options available?

Hello

I'm running SAS 9.3

When I control the HAXIS by hard coding the character midpoints does this preclude me from using the AXIS1 options? 

In the example below I do not want a label on the horizontal axis but I can not fathom a method to use AXIS1 in conjunction with a character defined list. 

Axis1

  STYLE=1

  WIDTH=1

  MINOR=NONE

  label=none

;

PROC GPLOT DATA=sashelp.cars;

  PLOT invoice * origin/

  VAXIS=AXIS2

  HAXIS='Europe'  'Asia'  'USA'

;

RUN; QUIT;


Accepted Solutions
Solution
‎01-28-2015 10:34 AM
Grand Advisor
Posts: 10,191

Re: GPLOT HAXIS character defined limits options available?

Add the points you want to the AXIS definition with an ORDER clause.

In your case add

Order = ('Europe'  'Asia'  'USA') to the Axis1 and then HAXIS=AXIS1

it may want " instead of '.

Character values can be specified in any order, but the character strings must match exactly the variable values in case and spelling. And if you have a format for the variable the values must be the formatted values for GCHART and unformatted values for GPLOT.

View solution in original post


All Replies
Solution
‎01-28-2015 10:34 AM
Grand Advisor
Posts: 10,191

Re: GPLOT HAXIS character defined limits options available?

Add the points you want to the AXIS definition with an ORDER clause.

In your case add

Order = ('Europe'  'Asia'  'USA') to the Axis1 and then HAXIS=AXIS1

it may want " instead of '.

Character values can be specified in any order, but the character strings must match exactly the variable values in case and spelling. And if you have a format for the variable the values must be the formatted values for GCHART and unformatted values for GPLOT.

☑ This topic is SOLVED.

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

Discussion stats
  • 1 reply
  • 252 views
  • 0 likes
  • 2 in conversation