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

Hello!

Does anybody know how to change the axes values? I am plotting a series of scatterplots and when the numbers get too big sometimes they appear in scientific notation. How can I change that?

Unwanted Y-axis:

   

Desired Y-Axis

        

1 ACCEPTED SOLUTION

Accepted Solutions
AncaTilea
Pyrite | Level 9

Hi,

Without any sample data/code, I created something...

DATA HAVE;

DO I = 5000000 TO 25000000 BY 5000000;

  REVENUE = I;

  PROFIT = I/20;

  OUTPUT;

END;

DROP I;

RUN;

PROC FORMAT;

  VALUE BIG 5000000 = "5,000,000"

  10000000 = "10,000,000"

  15000000 = "15,000,000"

  20000000 = "20,000,000"

  25000000 = "25,000,000"

;

QUIT;

GOPTIONS RESET = ALL;

AXIS1 LABEL = (F = ARIAL H = 2 A = 90 "REVENUE" )

  ORDER = (5000000 TO 25000000 BY 5000000) V = (F = ARIAL H = 1.5);

PROC GPLOT DATA = HAVE;

PLOT REVENUE * PROFIT/VAXIS = AXIS1;

FORMAT REVENUE BIG.;

RUN;QUIT;

Bascially, I think you may need to use some format.

Good luck!

Anca.

View solution in original post

3 REPLIES 3
AncaTilea
Pyrite | Level 9

Hi,

Without any sample data/code, I created something...

DATA HAVE;

DO I = 5000000 TO 25000000 BY 5000000;

  REVENUE = I;

  PROFIT = I/20;

  OUTPUT;

END;

DROP I;

RUN;

PROC FORMAT;

  VALUE BIG 5000000 = "5,000,000"

  10000000 = "10,000,000"

  15000000 = "15,000,000"

  20000000 = "20,000,000"

  25000000 = "25,000,000"

;

QUIT;

GOPTIONS RESET = ALL;

AXIS1 LABEL = (F = ARIAL H = 2 A = 90 "REVENUE" )

  ORDER = (5000000 TO 25000000 BY 5000000) V = (F = ARIAL H = 1.5);

PROC GPLOT DATA = HAVE;

PLOT REVENUE * PROFIT/VAXIS = AXIS1;

FORMAT REVENUE BIG.;

RUN;QUIT;

Bascially, I think you may need to use some format.

Good luck!

Anca.

ballardw
Super User

I'm guessing the the likely current format for your predicted variable is BEST8. You don't need a custom format COMMA12. should work for your displayed example.

If you aren't interested in the level of control an AXIS statement gives add  statements similar to:

Format minsalary comma12.;

label minsalary = 'Predicted';

to the proc statements.

Greek
Obsidian | Level 7

Formatting worked! Smiley Happy

Thank you all very much!

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 3545 views
  • 4 likes
  • 3 in conversation