turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Annotating a Scatter plot with multiple Star Plots...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2017 12:49 PM

Hello,

I would like to use star plots, rose plots or polar plots on a scatter plot.

A search with google has not turned up a solution (i did find out how to produce individual star plots).

If someone could point me in the right direction, I would really appreciate it.

Best

Dan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Dan4

02-26-2017 07:53 PM

You need to tell us more. what exactly do you want? what did you find? why isn't it suitable?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Dan4

02-28-2017 10:32 AM

Good Morning,

As requested here is some more detail.

I would like to create a bivariate scatter plot based on two continuous variables.

Rather than a simple dot or star representing the point, or a bubble which could differ in size based on a third variable, I would like to use a starplot (rose or polar plot) which would change shape based on 7 or 8 other variables.

The starchart procedure (at least as I understand it) can produce the starplots, but they are not organized on the plot based on two other continuous variables.

My thought would be to use gplot to create the scatter plot, but use annotate to create the starplot that would then be placed on the scatter plot at the appropriate point.

I hope that helps.

Best

Dan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Dan4

02-28-2017 02:48 PM

Here's one way to do it ...

data foo;

input x y val1 val2 val3 val4 val5 val6 val7;

datalines;

40 60 1 1 1 1 1 1 1

20 76 1 2 3 4 5 6 7

60 20 1 2 1 2 3 2 1

;

run;

data anno_stars; set foo;

xsys='2'; ysys='2'; hsys='3'; when='a';

size_factor=1.8;

function='pie'; rotate=0; color='blue';

angle=(360/7)*1; size=size_factor*val1; output;

angle=(360/7)*2; size=size_factor*val2; output;

angle=(360/7)*3; size=size_factor*val3; output;

angle=(360/7)*4; size=size_factor*val4; output;

angle=(360/7)*5; size=size_factor*val5; output;

angle=(360/7)*6; size=size_factor*val6; output;

angle=(360/7)*7; size=size_factor*val7; output;

run;

goptions gunit=pct;

axis1 order=(0 to 100 by 20);

axis2 order=(0 to 100 by 20);

symbol1 value=circle height=2.0 color=black interpol=none;

proc gplot data=foo anno=anno_stars;

plot y*x=1 / vaxis=axis1 haxis=axis2;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RobertAllison_SAS

02-28-2017 04:33 PM

@RobertAllison_SAS You cheated! You are supposed to move and then draw!

After all these years, I never thought of using function pie to do it in one step.

There's always new tricks to learn...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to RobertAllison_SAS

03-01-2017 10:36 AM

Thank you Robert,

This is excellent!

It will do the job!

Any ideas aboutt changing the bars to stars?

Thank you again.

Best

Dan4