BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DR_Majeti
Quartz | Level 8

Hi,

When I tried to produce a graph without discrete option in Proc Gchart,

I Observed a Graph obtaining midpoints on X-axis (I want know How midpoints will be calculated for the given values for Numeric variable.).

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

I've never seen Gchart's automatic midpointing algorithm in the doc.  Here is a page that describes a little about it (but not the full algorithm)...

SAS/GRAPH(R) 9.3: Reference, Third Edition

If you want to know see the exact start & end value in the axis midpoint text (instead of seeing just the single midpoint value), you can use the 'range' option, such as ...

gchart data=sashelp.class;

height / range type=mean sumvar=weight;

run;

I usually pre-process my data, and calculate my own ranges for the bars (using if/else statements, or proc rank, etc), so that I know exactly what's in which bar.

View solution in original post

2 REPLIES 2
GraphGuy
Meteorite | Level 14

I've never seen Gchart's automatic midpointing algorithm in the doc.  Here is a page that describes a little about it (but not the full algorithm)...

SAS/GRAPH(R) 9.3: Reference, Third Edition

If you want to know see the exact start & end value in the axis midpoint text (instead of seeing just the single midpoint value), you can use the 'range' option, such as ...

gchart data=sashelp.class;

height / range type=mean sumvar=weight;

run;

I usually pre-process my data, and calculate my own ranges for the bars (using if/else statements, or proc rank, etc), so that I know exactly what's in which bar.

DR_Majeti
Quartz | Level 8

Hi,

I Got cleared my doubt 95%.

Thank you for the Information, I have another Doubt regarding this -- How SAS will take number of midpoints should be given for the chart.

If we use levels or midpoints we will get how many we want, but can I know about number of default midpoints produced.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 832 views
  • 0 likes
  • 2 in conversation