<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i have one observation with 10 results and i try to scatter the plot but i free something not ri in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790826#M15748</link>
    <description>&lt;P&gt;You might want to melt the data set first or reshape your input&lt;/P&gt;
&lt;P&gt;&lt;A href="https://pandas.pydata.org/docs/reference/api/pandas.melt.html" target="_blank" rel="noopener"&gt;https://pandas.pydata.org/docs/reference/api/pandas.melt.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 08:37:24 GMT</pubDate>
    <dc:creator>Konu-Tec</dc:creator>
    <dc:date>2022-01-19T08:37:24Z</dc:date>
    <item>
      <title>i have one observation with 10 results and i try to scatter the plot but i free something not right</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790805#M15747</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the work i did so far, is anyone can help me where is the problem and how can i fix it, thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-01-18 at 11.46.03 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67489iAB4B03CE24A64B63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-01-18 at 11.46.03 PM.png" alt="Screen Shot 2022-01-18 at 11.46.03 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-01-18 at 11.45.56 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67490iE76E16BCE5A42E92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-01-18 at 11.45.56 PM.png" alt="Screen Shot 2022-01-18 at 11.45.56 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 04:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790805#M15747</guid>
      <dc:creator>tmorr</dc:creator>
      <dc:date>2022-01-19T04:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: i have one observation with 10 results and i try to scatter the plot but i free something not ri</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790826#M15748</link>
      <description>&lt;P&gt;You might want to melt the data set first or reshape your input&lt;/P&gt;
&lt;P&gt;&lt;A href="https://pandas.pydata.org/docs/reference/api/pandas.melt.html" target="_blank" rel="noopener"&gt;https://pandas.pydata.org/docs/reference/api/pandas.melt.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 08:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790826#M15748</guid>
      <dc:creator>Konu-Tec</dc:creator>
      <dc:date>2022-01-19T08:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: i have one observation with 10 results and i try to scatter the plot but i free something not ri</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790846#M15749</link>
      <description>&lt;P&gt;Not sure exactly what you are looking for since you are vague. My guess is you want to see the the obs value by &lt;STRONG&gt;Substance&lt;/STRONG&gt; in a scatter plot? Do you care about the observation number? Also in the future can you paste code to create the sample data to make it easier for us to test code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/320767"&gt;@Konu-Tec&lt;/a&gt;&amp;nbsp; said, you probably need to 'melt' the data from wide to narrow. Sometimes called transpose. With SAS you can use &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p1r2tjnp8ewe3sn1acnpnrs3xbad.htm" target="_blank"&gt;PROC TRANPOSE&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is sample data I made using your image:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data outdata;
	input Substance $ obs1-obs4;
	datalines;
	1 29 28 23 26
	2 17 25 24 19
	3 17 16 21 22
	4 18 20 25 24
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then transpose/melt the data from wide to narrow using PROC TRANPOSE:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=outdata 
			   out=narrowdata(rename=(col1=Value))
			   name=ObsNumber;
	by substance;
run;&lt;BR /&gt;&lt;BR /&gt;proc print data=narrowdata;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tranposed.png" style="width: 206px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67497i4107870F5B04F73A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tranposed.png" alt="Tranposed.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that the data is in narrow format. Use the &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p1lcbd3lhs3t3bn1jk6d8sjt2yqx.htm#n0qe6wr3f0bgdan1oum0lmulf1ine" target="_blank"&gt;SCATTER&lt;/A&gt; statement in SGPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=narrowdata;
	scatter x=Substance y=Value;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Default Scatter.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67498iB4E0395F4316084D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Default Scatter.png" alt="Default Scatter.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't like the default image, so you can begin to explore different options and statements in SGPLOT. I'm also not sure exactly what you are looking for, but here is a start:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title color=charcoal justify=left height=14pt "Value by Substance";
proc sgplot data=narrowdata;
	scatter x=Substance y=Value /
			group=Substance
			markerattrs=(symbol=circleFilled);
	keylegend / noborder title="";
	yaxis values=(0 to 35 by 5);
quit;
title;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FinalScatter.png" style="width: 641px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67499iE98B81F6DFDA9023/image-size/large?v=v2&amp;amp;px=999" role="button" title="FinalScatter.png" alt="FinalScatter.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Peter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 10:42:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/790846#M15749</guid>
      <dc:creator>Panagiotis</dc:creator>
      <dc:date>2022-01-19T10:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: i have one observation with 10 results and i try to scatter the plot but i free something not ri</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/791020#M15750</link>
      <description>&lt;P&gt;thank you so much! so here is another question that if i try to get the ANOVA table, i try the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc anova data = outdata;&lt;BR /&gt;class Substance;&lt;BR /&gt;model Substance = value;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but there is a error,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 20:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/791020#M15750</guid>
      <dc:creator>tmorr</dc:creator>
      <dc:date>2022-01-19T20:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: i have one observation with 10 results and i try to scatter the plot but i free something not ri</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/791025#M15752</link>
      <description>&lt;P&gt;Glad it helped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your other question you should explore or post in the statistical procedures forum here:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures" target="_self"&gt;https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 20:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/i-have-one-observation-with-10-results-and-i-try-to-scatter-the/m-p/791025#M15752</guid>
      <dc:creator>Panagiotis</dc:creator>
      <dc:date>2022-01-19T20:53:28Z</dc:date>
    </item>
  </channel>
</rss>

