楼主: nankaimy
8513 11

[问答] SAS 怎么标识散点图中的点啊,谢谢 [推广有奖]

  • 1关注
  • 1粉丝

已卖:325份资源

博士生

2%

还不是VIP/贵宾

-

威望
0
论坛币
8257 个
通用积分
46.1932
学术水平
0 点
热心指数
3 点
信用等级
2 点
经验
5283 点
帖子
110
精华
0
在线时间
217 小时
注册时间
2009-12-27
最后登录
2024-2-17

楼主
nankaimy 发表于 2010-12-5 23:19:29 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
数据是这样的


x1ytype
2.451.281
2.081.032
1.80.83
2.571.484
2.261.985
2.291.886
4.773.567
5.293.438
5.734.589
8.6210
7.72.0411
8.581.7712
9.82.313
11.153.0814
12.023.715
13.593.4116
10.263.5317
12.95.118


或者

x1ytype
2.451.28A
2.081.03B
1.80.8C
2.571.48D
2.261.98E
2.291.88F
4.773.56G
5.293.43H
5.734.58I
8.62J
7.72.04K
8.581.77L
9.82.3M
11.153.08N
12.023.7O
13.593.41P
10.263.53Q
12.95.1R

怎么画出以X1为X轴,y为Y轴的散点图,并且在散点图中标上对应的type列的变量,谢谢啦
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:散点图 type SAS

回帖推荐

hopewell 发表于4楼  查看完整内容

本帖被以下文库推荐

沙发
飘洒 发表于 2010-12-6 19:01:29
R中是可以的,SAS还没用到。
R中可用text()这个函数来实现。
It is not entirely satisfying but the alternatives are worse!
统计人

藤椅
guo.bailing 发表于 2010-12-6 19:24:44
未命名.JPG
自助者,天助之!

板凳
hopewell 发表于 2010-12-6 20:38:51

  1. proc sgplot data=raw;
  2.     scatter x=x1 y=type /markerchar=type;
  3. run;
复制代码

SGPlot8.png (6.94 KB)

SGPlot8.png

已有 5 人评分学术水平 热心指数 信用等级 收起 理由
yukiooy + 1 + 1 + 1 帖子很精彩,很有代表性
webgu + 1 + 1 + 1 大哥出手了。
飘洒 + 1 + 1 学习了
nankaimy + 1 + 1 + 1 好的意见建议
guo.bailing + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 5  热心指数 + 5  信用等级 + 4   查看全部评分

观钓颇逾垂钓趣 种花何问看花谁

报纸
nankaimy 发表于 2010-12-6 23:26:45
你好,我运行的时候,怎么显示
109  proc sgplot data=raw;
ERROR: 过程 SGPLOT 没有找到。
110
111      scatter x=x1 y=type /markerchar=type;
112
113  run;
NOTE: SAS 系统由于错误而停止了该步的处理。
NOTE: “PROCEDURE SGPLOT”所用时间(总处理时间):
      实际时间         0.00 秒
      CPU 时间         0.00 秒


我的代码是这样写的:

data raw;
input x1 y type;
cards;
2.45 1.28 1
2.08 1.03 2
1.8 0.8 3
2.57 1.48 4
2.26 1.98 5
2.29 1.88 6
4.77 3.56 7
5.29 3.43 8
5.73 4.58 9
8.6 2 10
7.7 2.04 11
8.58 1.77 12
9.8 2.3 13
11.15 3.08 14
12.02 3.7 15
13.59 3.41 16
10.26 3.53 17
12.9 5.1 18
;
run;
proc print;
run;


proc sgplot data=raw;
    scatter x=x1 y=type /markerchar=type;
run;

谢谢啦
4# hopewell

地板
nankaimy 发表于 2010-12-6 23:28:18
4# hopewell

你好,我运行的时候,怎么显示
109  proc sgplot data=raw;
ERROR: 过程 SGPLOT 没有找到。
110
111      scatter x=x1 y=type /markerchar=type;
112
113  run;
NOTE: SAS 系统由于错误而停止了该步的处理。
NOTE: “PROCEDURE SGPLOT”所用时间(总处理时间):
      实际时间         0.00 秒
      CPU 时间         0.00 秒


我的代码是这样写的:

data raw;
input x1 y type;
cards;
2.45 1.28 1
2.08 1.03 2
1.8 0.8 3
2.57 1.48 4
2.26 1.98 5
2.29 1.88 6
4.77 3.56 7
5.29 3.43 8
5.73 4.58 9
8.6 2 10
7.7 2.04 11
8.58 1.77 12
9.8 2.3 13
11.15 3.08 14
12.02 3.7 15
13.59 3.41 16
10.26 3.53 17
12.9 5.1 18
;
run;
proc print;
run;


proc sgplot data=raw;
    scatter x=x1 y=type /markerchar=type;
run;

谢谢啦

7
sopching 发表于 2010-12-8 00:43:22
6# nankaimy 那是因为你SAS版本比较低 ,9.2是支持sgplot的

8
sean1945 发表于 2010-12-8 09:18:12
7楼说的对,9.1的不支持 SGPLOT
他大舅他二舅都是他舅,高桌子低板凳都是木头

9
fyfzhdsfdx 发表于 2013-1-30 18:15:22
sopching 发表于 2010-12-8 00:43
6# nankaimy 那是因为你SAS版本比较低 ,9.2是支持sgplot的
我的是SAS9.2,用同样的代码,但是还是有错
ERROR: 无法加载 Java 虚拟机。请参阅安装说明,或与系统管理员联系。
NOTE: 由于出错,SAS 系统停止处理该步。
这个错误是什么意思?求解,十分感谢!

10
wyzh 发表于 2013-1-31 10:26:11
I got the same issue. Below is what I found from the SAS website:

Troubleshooting Java Runtime Environment Errors
When you use the Windowing environment of SAS (interactive SAS) in SAS 9.3, you might encounter error messages similar to the following in the SAS Log window when you run programs (for example: Proc javainfo; run;):
ERROR: Unable to attach current thread"
   ERROR: Unable to load the java virtual machine"
   ERROR: Proc javainfo did not run correctly
   ERROR: The Java proxy is not responding.
   ERROR: The Java proxy's JNI call to start the VM failed.
   ERROR: Java failed to start during the SAS startup.
These errors are typically related to issues with the Java Runtime Environment (JRE). To resolve these issues, follow these steps:
Check your JREOPTIONS settings by submitting the following code in SAS:proc options option=jreoptions;
run;
Your log output should be similar to the following:
proc options option=jreoptions; run;

JREOPTIONS=(             -DPFS_TEMPLATE=C:\Program
Files\SASHome\SASFoundation\9.3\tkjava\sasmisc\qrpfstpt.xml
-Djava.class.path=C:\PROGRA~1\SASHome\SASVER~1\eclipse\plugins\
SASLAU~1.JAR
-Djava.security.auth.login.config=C:\Program
Files\SASHome\SASFoundation\9.3\tkjava\sasmisc\sas.login.config
-Djava.security.policy=C:\Program Files\SASHome\SASFoundation\
9.3\tkjava\sasmisc\sas.policy
-Djava.system.class.loader=com.sas.app.AppClassLoader
-Dlog4j.configuration=file:/C:/Program%20Files/SASHome/
SASFoundation/9.3/tkjava/sasmisc/sas.log4j.properties
-Dsas.app.class.path=C:\PROGRA~1\SASHome\SASVER~1\eclipse\
plugins\tkjava.jar
-Dsas.ext.config=C:\Program Files\SASHome\SASFoundation\9.3\
tkjava\sasmisc\sas.java.ext.config
-Dsas.jre.libjvm=C:\PROGRA~2\Java\JRE16~1.0_2\bin\client\jvm.dll
-Dtkj.app.launch.config=C:\PROGRA~1\SASHome\SASVER~1\picklist -Xms128m          )
                  Java Runtime Environment options
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
At the end of the log output, you should have a value that is similar to the following:
-Dsas.jre.libjvm=C:\PROGRA~2\Java\JRE16~1.0_2\bin\client\jvm.dll
Navigate to the location that is specified by -Dsas.jre.libjvm and verify the location of the jvm.dll file.
To display the JRE version that is installed on your computer:
Select StartRun and type cmd.
Navigate to the bin directory by using the cd command. For example: C:\PROGRA~2\Java\JRE16~1.0_2\bin\ Following are examples of DOS commands that navigate to the bin location and verify the Java version:
C:\>cd program files (x*

C:\Program Files (x86)\Java>cd jre1.6.0_24

C:\Program Files (x86)\Java\jre1.6.0_24>java -fullversion
java full version "1.6.0_24-b07"
Type java –version
Here is an example output from submitting the java —version command:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-bit Server VM (build 19.1-b02, mixed mode)
Verify the Windows short name in the sasv9.cfg file. Here is an example: Progra~1 . At the DOS command, type dir /x c:\prog*
Your output should be similar to the following:
Directory of c:\
<DIR>        PROGRA~1     Program Files   
<DIR>        PROGRA~2     Program Files (x86)                                                      
   
Open your SAS configuration file in a text editor such as Notepad from C:\Program Files\SASHome\SASFoundation\9.3\nls\en\sasv9.cfg and locate the -jreoptions line. Ensure that all of the text is on one line of this file. Spaces are inserted at the start of each option, and each option begins with a hyphen (-). Also, verify the paths. Here is an example of the JREOPTIONS in the sasv9.cfg file:
/*  Options used when SAS is accessing a JVM for JNI processing  */
-JREOPTIONS=(

        -DPFS_TEMPLATE=!SASROOT\tkjava\sasmisc\qrpfstpt.xml
        -Djava.class.path=C:\PROGRA~1\SASHome\SASVER~1\eclipse
\plugins\SASLAU~1.JAR
        -Djava.security.auth.login.config=!SASROOT\tkjava\sasmisc\
sas.login.config        -Djava.security.policy=!SASROOT\tkjava\sasmisc\sas.policy
        -Djava.system.class.loader=com.sas.app.AppClassLoader
        -Dlog4j.configuration=file:/C:/Program%20Files/SASHome/SASFoundation
/9.3/tkjava/sasmisc/sas.log4j.properties
        -Dsas.app.class.path=C:\PROGRA~1\SASHome\SASVER~1\eclipse
\plugins\tkjava.jar
        -Dsas.ext.config=!SASROOT\tkjava\sasmisc\sas.java.ext.config
        -Dsas.jre.libjvm=C:\PROGRA~2\Java\JRE16~1.0_2\bin\client\jvm.dll
        -Dtkj.app.launch.config=C:\PROGRA~1\SASHome\SASVER~1\picklist
        -Xms128m
        -Xmx128m
        )
Look for error messages in the Java log located in C:\Documents and Settings\<userid>\Application Data\SAS\LOGS.
From the Control Panel you must uninstall the JRE, reboot, delete the JRE directory, and then reinstall the JRE from the SAS Software Depot. To do this, perform the following steps:
From the Control Panel select Add/Remove ProgramsJava(TM) 6 Update 24 and remove the program. You can also perform this action from Programs and Features.
Reboot the PC.
From Windows Explorer, right-click on Start and select Open Windows Explorer or explore. Delete the JRE directory. Here is an example: C:\Program Files (x86)\Java\jre1.6.0_24)
Click on the Third Party Software Requirements for use with the SAS products page, and download the required JRE. See http://support.sas.com/resources/thirdpartysupport/index.html. You can also click on the jre*.exe exe file that is located in the SAS Software Depot to install the JRE that is needed from your order. Here are some examples:
<SAS Software Depot>\products\javaruntime__99170__win__xx__sp0__1
\jre-6u24-windows-i586.exe

<SAS Software Depot>\products\javaruntime__99170__wx6__xx__sp0__1
\jre-6u24-windows-i586.exe
Note: These 32–bit JRE installs are required even when the operating system is 64–bit.
Ensure that the path to the JREHOME is correct in the sassw.config file located in the SASHOME directory (C:\Program Files\SASHome\sassw.config. You can verify the required version by looking at the SAS Third Party Software Requirements. See http://support.sas.com/resources/thirdpartysupport/index.html This file launches Java-based products. Here is an example of the contents:
[properties]
   JREHOME=C:\Program Files (x86)\Java\jre1.6.0_24\bin\java.exe
   SASHOME=C:\Program Files\SASHome
   DPLMTREGLOC=C:\Program Files\SASHome\deploymntreg
   VJRHOME=C:\Program Files\SASHome\SASVersionedJarRepository
Verify your Java settings and determine if you receive any error messages by submitting the following code in SAS:proc javainfo; run;
Here is an example of the output that should appear in the log window:
PFS_TEMPLATE = C:\Program Files\SASHome\SASFoundation\9.3\tkjava\sasmisc
\qrpfstpt.xml
java.class.path = C:\PROGRA~1\SASHome\SASVER~1\eclipse\plugins\SASLAU~1.JAR
java.class.version = 50.0
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.6.0_24-b07
java.security.auth.login.config = C:\Program
Files\SASHome\SASFoundation\9.3\tkjava\sasmisc\sas.login.config
java.security.policy = C:\Program Files\SASHome\SASFoundation\
9.3\tkjava\sasmisc\sas.policy
java.specification.version = 1.6
java.system.class.loader = com.sas.app.AppClassLoader
java.vendor = Sun Microsystems Inc.
java.version = 1.6.0_24
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.version = 1.0
java.vm.version = 19.1-b02
sas.app.class.path = C:\PROGRA~1\SASHome\SASVER~1\eclipse\plugins\tkjava.jar
sas.ext.config = C:\Program Files\SASHome\SASFoundation\9.3\
tkjava\sasmisc\sas.java.ext.config
sas.jre.libjvm = C:\PROGRA~2\Java\JRE16~1.0_2\bin\client\jvm.dll
tkj.app.launch.config = C:\PROGRA~1\SASHome\SASVER~1\picklist
user.country = US
user.language = en

NOTE: PROCEDURE JAVAINFO used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

*** NOTE: JRE issues can also cause other SAS applications not to open
(for example, the SAS Installation Qualification Tools).

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-27 03:34