<?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 Scatterplot symbol from another variable in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930175#M18057</link>
    <description>&lt;P&gt;I have a dataset with five variables I would like to use to display the data on a graph. The data is grouped by the first variable (p) and sub-grouped by the second variable (i) along the x-axis. The fourth variable (nor) determines the height of the point along the y-axis. The fifth variable (mnor) is the mean of the nor values for each subgroup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to replace the circle with a unique symbol determined by the third variable (date), so that the graph is easier to interpret the results from different days the data was collected. I have been able to replace the point with the date but would prefer a symbol to minimize clutter. I've included a sample code below. The first graph is my original graph without including the date variable, and the second graph is replacing the points with the date value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data samp;
	input p$ i date: date9. nor mnor;
	format date date9.;
	datalines;
	A 0 16May2024 1.230 1.000
	A 0 23May2024 0.770 1.000
	A 1 16May2024 0.014 0.021
	A 1 23May2024 0.028 0.021
	B 0 16May2024 1.576 1.504
	B 0 23May2024 1.432 1.504
	B 1 16May2024 0.064 0.071
	B 1 23May2024 0.078 0.071
	C 0 16May2024 0.432 0.510
	C 0 23May2024 0.588 0.510
	C 1 16May2024 0.011 0.009
	C 1 23May2024 0.007 0.009
	;

title "Example Graph 1";
proc sgplot data = samp noborder;
	scatter x = p y = nor /
		markerattrs = (symbol=CircleFilled) group = i  groupdisplay = cluster;
	highlow x = p low = mnor high = mnor / nofill type = bar barwidth = 0.4 group = i groupdisplay = cluster;
	xaxis type = discrete labelattrs = (size = 9) display = (nolabel);
	yaxis labelattrs = (size = 9) display = (nolabel) grid;
run;

title "Example Graph 2";
proc sgplot data = samp noborder;
	scatter x = p y = nor /
		markercharattrs = (weight = bold) markerchar = date group = i groupdisplay = cluster;
	highlow x = p low = mnor high = mnor / nofill type = bar barwidth = 0.4 group = i groupdisplay = cluster;
	xaxis type = discrete labelattrs = (size = 9) display = (nolabel);
	yaxis labelattrs = (size = 9) display = (nolabel) grid;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 29 May 2024 19:48:24 GMT</pubDate>
    <dc:creator>jrleighty</dc:creator>
    <dc:date>2024-05-29T19:48:24Z</dc:date>
    <item>
      <title>Scatterplot symbol from another variable</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930175#M18057</link>
      <description>&lt;P&gt;I have a dataset with five variables I would like to use to display the data on a graph. The data is grouped by the first variable (p) and sub-grouped by the second variable (i) along the x-axis. The fourth variable (nor) determines the height of the point along the y-axis. The fifth variable (mnor) is the mean of the nor values for each subgroup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to replace the circle with a unique symbol determined by the third variable (date), so that the graph is easier to interpret the results from different days the data was collected. I have been able to replace the point with the date but would prefer a symbol to minimize clutter. I've included a sample code below. The first graph is my original graph without including the date variable, and the second graph is replacing the points with the date value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data samp;
	input p$ i date: date9. nor mnor;
	format date date9.;
	datalines;
	A 0 16May2024 1.230 1.000
	A 0 23May2024 0.770 1.000
	A 1 16May2024 0.014 0.021
	A 1 23May2024 0.028 0.021
	B 0 16May2024 1.576 1.504
	B 0 23May2024 1.432 1.504
	B 1 16May2024 0.064 0.071
	B 1 23May2024 0.078 0.071
	C 0 16May2024 0.432 0.510
	C 0 23May2024 0.588 0.510
	C 1 16May2024 0.011 0.009
	C 1 23May2024 0.007 0.009
	;

title "Example Graph 1";
proc sgplot data = samp noborder;
	scatter x = p y = nor /
		markerattrs = (symbol=CircleFilled) group = i  groupdisplay = cluster;
	highlow x = p low = mnor high = mnor / nofill type = bar barwidth = 0.4 group = i groupdisplay = cluster;
	xaxis type = discrete labelattrs = (size = 9) display = (nolabel);
	yaxis labelattrs = (size = 9) display = (nolabel) grid;
run;

title "Example Graph 2";
proc sgplot data = samp noborder;
	scatter x = p y = nor /
		markercharattrs = (weight = bold) markerchar = date group = i groupdisplay = cluster;
	highlow x = p low = mnor high = mnor / nofill type = bar barwidth = 0.4 group = i groupdisplay = cluster;
	xaxis type = discrete labelattrs = (size = 9) display = (nolabel);
	yaxis labelattrs = (size = 9) display = (nolabel) grid;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 May 2024 19:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930175#M18057</guid>
      <dc:creator>jrleighty</dc:creator>
      <dc:date>2024-05-29T19:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Scatterplot symbol from another variable</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930179#M18058</link>
      <description>&lt;P&gt;Can you post a link to a graph similar to what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does your "real" data have more than 2 dates involved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having a hard time envisioning, given the data, the use at all. You have a highlow plot with the same variable for high and low which doesn't really make sense for the purpose behind high and low.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 20:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930179#M18058</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-29T20:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scatterplot symbol from another variable</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930233#M18062</link>
      <description>&lt;P&gt;I cannot visualize what you are trying to do, but consider whether you need to use a second SCATTER statement to get the symbols that you need. The first SCATTER statement uses the GROUP= option, so the marker colors and symbols are tied to the group variable (i). You might need to structure the data differently and use a second scatter plot overlay to achieve your result.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 09:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Scatterplot-symbol-from-another-variable/m-p/930233#M18062</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-05-30T09:38:03Z</dc:date>
    </item>
  </channel>
</rss>

