<?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: cannot get GPLOT procedure to show a scatterplot. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892972#M24082</link>
    <description>&lt;P&gt;You have not requested a scatter plot. A scatter plot is generally individual points only. The&amp;nbsp; Symbol statement option you provided&lt;/P&gt;
&lt;PRE&gt;SYMBOL1 V=CIRCLE I=SM70S;&lt;/PRE&gt;
&lt;P&gt;has an interpolation option, the I= part, that with SM is smoothed line using splines. The 70 is a degree of how much "smoothness" to use with 70 being fairly high on reducing noise (bumps in a line). The last S sorts the X axis values before attempting to plot. So it attempts to place line through the data.&lt;/P&gt;
&lt;P&gt;Note: Proc GPLOT wants a QUIT to end the procedure.&lt;/P&gt;
&lt;P&gt;The example data you show has multiple y values for each x and very few x values so the vertical nature means the "spline" has some issues. This is shown in this note from the LOG:&lt;/P&gt;
&lt;PRE&gt;NOTE: Input data contained multiple vertical values for individual
      horizontal values. Parametric fit is required to force curve through
      individual observations.
&lt;/PRE&gt;
&lt;P&gt;I get this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gplot1.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87668i3FECAFEB03DA818C/image-size/large?v=v2&amp;amp;px=999" role="button" title="gplot1.png" alt="gplot1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Another way to show a simple scatter plot with SGPLOT (which has a bit more flexibility for most things than Gplot)&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plastic;
   scatter x=time y=hardness;
run;&lt;/PRE&gt;
&lt;P&gt;A regression plot through the points:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plastic;
   reg x=time y=hardness;
run;&lt;/PRE&gt;
&lt;P&gt;A penalized spline plot similar yours&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plastic;
   pbspline x=time y=hardness/smooth=70;
run&lt;/PRE&gt;
&lt;P&gt;There are options with the MARKERATTRS to set size, color and shape of markers. LINEATTRS for color and line pattern.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please do not post essentially identical questions on this forum.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 15:46:00 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-09-06T15:46:00Z</dc:date>
    <item>
      <title>cannot get GPLOT procedure to show a scatterplot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892914#M24080</link>
      <description>&lt;P&gt;I'm trying to make a simple scatterplot using GPLOT but I can't seem to get it working.&amp;nbsp; I copied the code exactly from lecture, no error messages, nothing in result viewer except my table.&amp;nbsp; &amp;nbsp;What am I missing?&amp;nbsp; Thanks for help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;DATA Plastic;
INPUT hardness time @@;
CARDS;
199 16 205 16 196 16 200 16 218 24 220 24 215 24 223 24 237 32 234 32 235 32 230 32 250 40 248 40 253 40 246 40
; 
RUN;


PROC PRINT DATA=Plastic;
RUN;

SYMBOL1 V=CIRCLE I=SM70S;
PROC GPLOT DATA=Plastic; 
PLOT hardness*time / FRAME;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Sep 2023 12:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892914#M24080</guid>
      <dc:creator>Buzzin124</dc:creator>
      <dc:date>2023-09-06T12:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: cannot get GPLOT procedure to show a scatterplot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892917#M24081</link>
      <description>&lt;P&gt;What does your log say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 12:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892917#M24081</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-09-06T12:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: cannot get GPLOT procedure to show a scatterplot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892972#M24082</link>
      <description>&lt;P&gt;You have not requested a scatter plot. A scatter plot is generally individual points only. The&amp;nbsp; Symbol statement option you provided&lt;/P&gt;
&lt;PRE&gt;SYMBOL1 V=CIRCLE I=SM70S;&lt;/PRE&gt;
&lt;P&gt;has an interpolation option, the I= part, that with SM is smoothed line using splines. The 70 is a degree of how much "smoothness" to use with 70 being fairly high on reducing noise (bumps in a line). The last S sorts the X axis values before attempting to plot. So it attempts to place line through the data.&lt;/P&gt;
&lt;P&gt;Note: Proc GPLOT wants a QUIT to end the procedure.&lt;/P&gt;
&lt;P&gt;The example data you show has multiple y values for each x and very few x values so the vertical nature means the "spline" has some issues. This is shown in this note from the LOG:&lt;/P&gt;
&lt;PRE&gt;NOTE: Input data contained multiple vertical values for individual
      horizontal values. Parametric fit is required to force curve through
      individual observations.
&lt;/PRE&gt;
&lt;P&gt;I get this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gplot1.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87668i3FECAFEB03DA818C/image-size/large?v=v2&amp;amp;px=999" role="button" title="gplot1.png" alt="gplot1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Another way to show a simple scatter plot with SGPLOT (which has a bit more flexibility for most things than Gplot)&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plastic;
   scatter x=time y=hardness;
run;&lt;/PRE&gt;
&lt;P&gt;A regression plot through the points:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plastic;
   reg x=time y=hardness;
run;&lt;/PRE&gt;
&lt;P&gt;A penalized spline plot similar yours&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=plastic;
   pbspline x=time y=hardness/smooth=70;
run&lt;/PRE&gt;
&lt;P&gt;There are options with the MARKERATTRS to set size, color and shape of markers. LINEATTRS for color and line pattern.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please do not post essentially identical questions on this forum.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 15:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892972#M24082</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-06T15:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: cannot get GPLOT procedure to show a scatterplot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892974#M24083</link>
      <description>What lecture is teaching gplot still?? Definitely use SGPLOT wherever possible.</description>
      <pubDate>Wed, 06 Sep 2023 15:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/892974#M24083</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-09-06T15:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: cannot get GPLOT procedure to show a scatterplot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/893168#M24090</link>
      <description>&lt;P&gt;Do you have a SAS/Graph license?&amp;nbsp; (if not, your log would probably give you some message)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you make sure to include the final 'run;' statement (depending on what interface you're using, you might or might not need it).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 14:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/cannot-get-GPLOT-procedure-to-show-a-scatterplot/m-p/893168#M24090</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2023-09-07T14:17:31Z</dc:date>
    </item>
  </channel>
</rss>

