<?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: Unable to plot floating numbers in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703341#M37803</link>
    <description>&lt;P&gt;PS this is the complete code I used for testing, most of it created by the EG wizard for multiple line plots (hence the ugly code formatting):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data toplot;
input id $ var time;
datalines;
id1 0.1 1
id2 0.2 1
id3 0.7 1
id1 1.5 2
id2 1.1 2
id3 2.1 2
;

PROC SORT DATA=WORK.TOPLOT;
BY time;
RUN;

SYMBOL1
  INTERPOL=JOIN
  HEIGHT=10pt
  VALUE=NONE
  LINE=1
  WIDTH=2

  CV = _STYLE_
;
SYMBOL2
  INTERPOL=JOIN
  HEIGHT=10pt
  VALUE=NONE
  LINE=1
  WIDTH=2

  CV = _STYLE_
;
SYMBOL3
  INTERPOL=JOIN
  HEIGHT=10pt
  VALUE=NONE
  LINE=1
  WIDTH=2

  CV = _STYLE_
;
Legend1
  FRAME
  ;
Axis1
  STYLE=1
  WIDTH=1
  MINOR=NONE


;
Axis2
  STYLE=1
  WIDTH=1
  MINOR=NONE


;

PROC GPLOT DATA = WORK.toplot;
PLOT var * time    =id
 /
   VAXIS=AXIS1

  HAXIS=AXIS2

FRAME  LEGEND=LEGEND1
;

RUN;

GOPTIONS RESET = SYMBOL;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 03 Dec 2020 11:23:42 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-12-03T11:23:42Z</dc:date>
    <item>
      <title>Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703331#M37801</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I recently faced a problem which seems to be related with SAS parameters/options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have this dataset :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data toplot;
input id $ var time;
datalines;
id1 0.1 1
id2 0.2 1
id3 0.7 1
id1 1.5 2
id2 1.1 2
id3 2.1 2
;
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;I want a graphic like this, which I plotted using the built-in functionnalities :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas1.PNG" style="width: 357px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52278i8E8500799A54F30A/image-dimensions/357x223?v=v2" width="357" height="223" role="button" title="sas1.PNG" alt="sas1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is if I run a second time the exact same code (by clicking the "Refresh" button), here is what I would get :&amp;nbsp;&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="sas2.PNG" style="width: 344px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52277iA96B80EFBB4292E0/image-dimensions/344x208?v=v2" width="344" height="208" role="button" title="sas2.PNG" alt="sas2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I plotted these to illustrate my problem : now, any graphic I will plot won't be able to plot numbers between integers. We can see that 0.7 got truncated to 0, 1.5 to 1... any real number x will be truncated to the lowest integer n s.t. n&amp;lt;=x.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically, during my entire SAS Session, the only nice plot I will have will be the first to be plotted, and any other graphics I want will be bugged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It really bothers me. The only thing I could think of that could cause this bug is this line of code I wrote :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS maxmemquery=6MB;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried to switch it to 1GB but still didn't work, and without this line I can't plot any graphic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know any solution to my problem ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 10:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703331#M37801</guid>
      <dc:creator>freshap</dc:creator>
      <dc:date>2020-12-03T10:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703337#M37802</link>
      <description>&lt;P&gt;Just tested it, the option has no effect on the graph, and the graph comes out the same when I run the code repeatedly.&lt;/P&gt;
&lt;P&gt;#1 suspect here is that something changes your data. Work through all the code you run while doing this.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703337#M37802</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-03T11:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703341#M37803</link>
      <description>&lt;P&gt;PS this is the complete code I used for testing, most of it created by the EG wizard for multiple line plots (hence the ugly code formatting):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data toplot;
input id $ var time;
datalines;
id1 0.1 1
id2 0.2 1
id3 0.7 1
id1 1.5 2
id2 1.1 2
id3 2.1 2
;

PROC SORT DATA=WORK.TOPLOT;
BY time;
RUN;

SYMBOL1
  INTERPOL=JOIN
  HEIGHT=10pt
  VALUE=NONE
  LINE=1
  WIDTH=2

  CV = _STYLE_
;
SYMBOL2
  INTERPOL=JOIN
  HEIGHT=10pt
  VALUE=NONE
  LINE=1
  WIDTH=2

  CV = _STYLE_
;
SYMBOL3
  INTERPOL=JOIN
  HEIGHT=10pt
  VALUE=NONE
  LINE=1
  WIDTH=2

  CV = _STYLE_
;
Legend1
  FRAME
  ;
Axis1
  STYLE=1
  WIDTH=1
  MINOR=NONE


;
Axis2
  STYLE=1
  WIDTH=1
  MINOR=NONE


;

PROC GPLOT DATA = WORK.toplot;
PLOT var * time    =id
 /
   VAXIS=AXIS1

  HAXIS=AXIS2

FRAME  LEGEND=LEGEND1
;

RUN;

GOPTIONS RESET = SYMBOL;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703341#M37803</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-03T11:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703377#M37804</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;-- something else must be changing between runs. As you're already writing your own code, PROC SGPLOT (maybe you're already using) provides the most flexibility here.&amp;nbsp; This code replicates your first plot, I think.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data toplot;
input id $ var time;
datalines;
id1 0.1 1
id2 0.2 1
id3 0.7 1
id1 1.5 2
id2 1.1 2
id3 2.1 2
;
run;

proc sgplot data=toplot;
 series x=time y=var / group=id;
 xaxis integer;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Dec 2020 14:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703377#M37804</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-12-03T14:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703380#M37805</link>
      <description>&lt;P&gt;I tried to create a new project, add a program with only both of your codes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;'s code gives the right plot, but if I run it twice or try to plot any other plot after the problem I described will remain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;'s code will always work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the exact same methodology and by the way, I am a 100% sure that I don't modify the data between two runs of the gplot or sgplot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence I think the problem comes from the GPLOT function... but why ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway thanks for your answers, but I'm still curious as to why GPLOT does that !&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 14:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703380#M37805</guid>
      <dc:creator>freshap</dc:creator>
      <dc:date>2020-12-03T14:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703381#M37806</link>
      <description>&lt;P&gt;Look in the settings of EG for code to be sent before/after each execution of a task or code node. There might be a setting of SAS/GRAPH options hidden in there.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 14:40:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703381#M37806</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-03T14:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703394#M37807</link>
      <description>&lt;P&gt;You are right&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Parameters, in the Graphical tab, I had Graphic format set to ActiveX. After trying all the options out, I found out ActiveX and Java would have this bug but any other format (Jpeg, png, gif, SAS EMF and even ActiveX Image and Java Image!) would work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence, I've set this option to ActiveX Image and now everything works fine, even though I am not sure as to which format is better.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703394#M37807</guid>
      <dc:creator>freshap</dc:creator>
      <dc:date>2020-12-03T15:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703417#M37808</link>
      <description>&lt;P&gt;ActiveX - creates a script that is embedded in your ODS HTML that triggers the dynamic SAS/GRAPH ActiveX control to render your image in the browser.&amp;nbsp; You can then "control" the image with menu options in the browser as you view it.&amp;nbsp; State-of-the-art in 1998, but these days it's not so common.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ActiveXImg - this uses the SAS/Graph ActiveX control (on Windows only) to render a static version of the image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend PNG for better portable delivery (Windows and Linux).&amp;nbsp; Or SVG if you want scalable plots.&amp;nbsp; However, the Graph tasks in EG will use PROC GPLOT/GCHART and not the more modern SGPLOT (ODS graphics).&amp;nbsp; If you're going to be doing a lot of this, it's worth learning the syntax.&amp;nbsp; Simple things are simple, and complex plots are possible with more study.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:38:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703417#M37808</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-12-03T15:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to plot floating numbers</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703423#M37809</link>
      <description>&lt;P&gt;What is the format you have assigned to your floating point variable? You have have assigned a format that does not display decimals such as a 4.0 then that could be the cause.&lt;/P&gt;
&lt;P&gt;You would have to change the format for the plotting procedure (if this the cause you may have other issues with reports as well using the formatted value for somethings).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-plot-floating-numbers/m-p/703423#M37809</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-03T15:51:49Z</dc:date>
    </item>
  </channel>
</rss>

