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

I am generating plots using GPLOT and I need the decimal points to be displayed as commas in the numbers on the X and Y axes.  Any ideas on how to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

You might also try using a 'locale' for the desired country/language, and then the nlnum format.

The nlnum format basically looks at the country/language set in the locale, and formats the decimals & commas in the number appropriately.  Here is an example:

options LOCALE=French_France;

proc gplot data=sashelp.class;
format age height nlnum5.1;
plot age*height;
run;

View solution in original post

3 REPLIES 3
Alpay
Fluorite | Level 6

You can use numx.d format to display comma instead of a period to separate decimal point.

data have;

    input xvar yvar;

datalines;

1.2 2

2.3 3

3.5 5

4.2 7

;

run;

goptions reset=all border cback=white htitle=12pt htext=10pt;                                                                          

title;

axis1 label=none;  

symbol1 interpol=spline value=dot color=blue;

proc gplot data=have;

   plot yvar*xvar/vaxis=axis1 ;

   format yvar xvar numx.2;

run;

quit;

GraphGuy
Meteorite | Level 14

You might also try using a 'locale' for the desired country/language, and then the nlnum format.

The nlnum format basically looks at the country/language set in the locale, and formats the decimals & commas in the number appropriately.  Here is an example:

options LOCALE=French_France;

proc gplot data=sashelp.class;
format age height nlnum5.1;
plot age*height;
run;

fastb
Fluorite | Level 6

Thank you Robert!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 6032 views
  • 2 likes
  • 3 in conversation