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

Is there a way to create lollipo chart such as the one shown below using SAS ?. What procedures should I use. I have SAS 9.3.

3-19-2015 5-59-19 PM.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

Use SAS 9.3 PROC SGPANEL:  You have more options using SAS 9.4 or later.

proc means data=sashelp.cars;

class origin type;

vars mpg_city;

output out=cars(where=(_type_ =3))

  mean=MeanMpg;

run;

data cars;

  set cars;

  zero=0;

run;

proc print;run;

ods graphics / reset width=4in height=3in imagename='CarsPanel';

title 'Mileage by Origin and Type';

proc sgpanel data=cars noautolegend;

  panelby origin / layout=rowlattice novarname uniscale=column;

  highlow y=type low=zero high=meanmpg / group=type;

  scatter y=type x=meanmpg / group=type markerattrs=(symbol=circlefilled);

  colaxis offsetmin=0;

  rowaxis display=(nolabel noticks) valueattrs=(size=6);

run;

CarsPanel.png

View solution in original post

3 REPLIES 3
ballardw
Super User

It will help if you can provide some data to experiment with.

OS2Rules
Obsidian | Level 7

Hi,

Not a complete answer, but you should look into this site:  http://blogs.sas.com/content/graphicallyspeaking/

They have a lot of grahphs with sample code and somewhere there is an index of all the graphs - might be worth a look.

Jay54
Meteorite | Level 14

Use SAS 9.3 PROC SGPANEL:  You have more options using SAS 9.4 or later.

proc means data=sashelp.cars;

class origin type;

vars mpg_city;

output out=cars(where=(_type_ =3))

  mean=MeanMpg;

run;

data cars;

  set cars;

  zero=0;

run;

proc print;run;

ods graphics / reset width=4in height=3in imagename='CarsPanel';

title 'Mileage by Origin and Type';

proc sgpanel data=cars noautolegend;

  panelby origin / layout=rowlattice novarname uniscale=column;

  highlow y=type low=zero high=meanmpg / group=type;

  scatter y=type x=meanmpg / group=type markerattrs=(symbol=circlefilled);

  colaxis offsetmin=0;

  rowaxis display=(nolabel noticks) valueattrs=(size=6);

run;

CarsPanel.png

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
  • 1874 views
  • 0 likes
  • 4 in conversation