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

いつもお世話になっております。
以下のproc g3dのような3次元の散布図を、sgplotかsgrenderで表現したいのですが
可能でしょうか。

data iris;
  set sashelp.iris;
  length color shape $8.;
  if species="Setosa" then do; shape="balloon"; color="blue"; end; 
  if species="Versicolor" then do; shape="balloon"; color="red"; end;
  if species="Virginica" then do; shape="balloon"; color="green"; end;
run;
proc g3d data=iris;
note j=r f="Albany AMT/bo" "Species:  " c=green "Virginica      "
         j=r    c=red "Versicolor      "
         j=r    c=blue "Setosa      ";
 scatter PetalLength*PetalWidth=SepalLength/
      color=color
      shape=shape
      size=1.5 noneedle grid tilt=80 rotate=30;
run;
quit;

ご教示のほど、よろしくお願いいたします。

 

1 ACCEPTED SOLUTION

Accepted Solutions
yu_sas
SAS Employee

残念ながら3次元の散布図に直接対応する機能はないです。

ただ3次元の座標から2次元に投影した際の座標が計算できるので、それを実装したマクロが公開されています。

 

A 3D Scatter Plot Macro

 

個人的にはHEATMAPを使うのもいいんじゃないかなと思います。

View solution in original post

2 REPLIES 2
yu_sas
SAS Employee

残念ながら3次元の散布図に直接対応する機能はないです。

ただ3次元の座標から2次元に投影した際の座標が計算できるので、それを実装したマクロが公開されています。

 

A 3D Scatter Plot Macro

 

個人的にはHEATMAPを使うのもいいんじゃないかなと思います。

sasone
Quartz | Level 8

yu_sasさま

 

早速のご回答、ありがとうございました。
3次元散布図の直接対応する機能はないとのこと。
バブルプロットにて描くことといたします。

proc sgplot data=sashelp.iris;
  title "Bubbles Show SepalLength Size";
  bubble x=PetalLength y=PetalWidth size=SepalLength / 
      datalabel=SepalLength group=Species transparency=0.1 dataskin=pressed;
        xaxis grid;
        yaxis grid;
run;

 

 

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!

Discussion stats
  • 2 replies
  • 1608 views
  • 1 like
  • 2 in conversation