<?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: SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337971#M11757</link>
    <description>&lt;P&gt;Sounds good. Since I'm creating a fixed-size image (poster), and know what size I want the inserted photos to be, I actually considered going with&amp;nbsp;a percentage earlier.&amp;nbsp;Simple enough to change now, even if I was too stubborn to do so earlier. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2017 19:43:56 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2017-03-03T19:43:56Z</dc:date>
    <item>
      <title>SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337141#M11699</link>
      <description>&lt;P&gt;In the code below, which inserts a photo into a 40"x22" image (for an SGF e-poster), what does the 75 in "width=75" refer to? &lt;BR /&gt;____________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;function="Image"; * Image annotation parameters;&lt;BR /&gt;image="/folders/myfolders/SGF2017Photos/VenetianLobby.jpg"; anchor="bottomleft"; &lt;BR /&gt;imagescale='fitwidth'; layer='back'; border='true '; linethickness=10; linecolor="black";&lt;BR /&gt;drawspace="datavalue"; x1="18APR2016:19:45:00"dt; y1=7000; width=75; widthunit='pixel';&lt;BR /&gt;output;&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;ods listing image_dpi=96 gpath='/folders/myfolders' device=png;&lt;BR /&gt;ods graphics on / reset antialias width=40in height=22in imagename="SGF2017steps1" imagefmt=png antialias;&lt;BR /&gt;____________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've got this working by trial-and-error, but can't for the life of me figure out what the "width=75" refers to - it doesn't seem to correspond to x-axis units, percent of image, or pixels, but that's probably just my lack of understanding (I'll have to ask my web designer daughter to give me an Images-for-Dummies lesson!).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I open the generated .png file in Paintbrush, the image is 3840 x 2112 px, which is what I'd expect (40in x 96dpi = 3840px), but the left side of the image starts at about 857px and ends at 1204px (including border), or 872px and 1188px (excluding border). If my math's correct, the latter 316px or 316/3840=8.23% of the image. In x-axis units, the picture (without border) starts at "18APR2016:19:45:00"dt and ends at "19APR2016:02:00:00"dt (difference=22500).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, any insight on how "width=75" relates to this? If this was SAS Jeopardy, this would be my $1,000 question for ODS Graphics. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks - appreciate the help!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 20:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337141#M11699</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2017-03-01T20:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337419#M11725</link>
      <description>&lt;P&gt;The documentation says that width is "&lt;SPAN class="shortDescription"&gt;specifies the width of the annotation. &lt;/SPAN&gt;&lt;SPAN class="paraSimpleFirst"&gt;Specify a positive number greater than zero. You can use the WIDTHUNIT variable to specify the unit of measurement." That seems straightforward and I'm sure you've looked at that as well, so my question is what happens to the resulting graph when you change value from 75 to, say, 100? Or 50? Does it not affect the annotation? What if you omit it altogether? I would think its effect as you alter its value in the code would give you some indication of what it's doing, no?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 15:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337419#M11725</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-03-02T15:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337485#M11733</link>
      <description>&lt;P&gt;I would expect the width is 75 pixels (as indicated by the WidthUnit parameter). &amp;nbsp;It will be scaled by DPI, but I still would not expect 316 px. &amp;nbsp;Please attach resulting image, or preferably the code we can run to investigate.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 18:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337485#M11733</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-03-02T18:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337743#M11743</link>
      <description>&lt;P&gt;Here's some simpler code with two tests that illustrate my probably-due-to-a-lack-of-understanding-of-images-and/or-Paintbrush confusion.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* CREATE ANNOTATON DATA SET - PICTURE TO BE INSERTED IS 200x100 .png;

data anno;                                           
function="Image";                                
image="/folders/myfolders/200x100.png"; 
anchor="bottomleft"; 
imagescale='fitwidth'; 
layer='back'; 
drawspace="datavalue"; 
x1=0; 
y1=0;
width=350; 
widthunit='pixel';
output;

* TEST 1: MAKE PICTURE A WIDTH OF 350 ON A 40x22in IMAGE;

ods _all_ close; run;                                
ods listing image_dpi=96 gpath='/folders/myfolders' device=png;
ods graphics on / reset antialias width=40in height=22in imagename="TEST40BY22" imagefmt=png antialias;
proc sgplot data=sashelp.cars sganno=anno nowall;    
scatter x=mpg_city y=mpg_highway;
run;
ods _all_ close; run;                                 

* TEST 2: MAKE PICTURE A WIDTH OF 350 ON A 4x4in IMAGE;

ods _all_ close;                                  
ods listing image_dpi=96 gpath='/folders/myfolders' device=png;
ods graphics on / reset antialias width=4in height=4in imagename="TEST4BY4" imagefmt=png antialias;
proc sgplot data=sashelp.cars sganno=anno nowall;    
scatter x=mpg_city y=mpg_highway;  
run;
ods _all_ close; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here is input picture &amp;nbsp;"/folders/myfolders/200x100.png".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7542i256892ABFD8CFF93/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="200x100.png" title="200x100.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which looks like this in Paintbrush.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7545i60DEAF3089BD409E/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Paint200x100Screenshot.gif" title="Paint200x100Screenshot.gif" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what output file&amp;nbsp;TEST40BY22.png looks like in Paintbrush.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7546iA5E0821940309425/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Paint40x22Screenshot.gif" title="Paint40x22Screenshot.gif" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, finally, here's what&amp;nbsp;output file TEST4BY4.png looks like in Paintbrush.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7548iF9541D3139C0A128/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="PAINT4x4Screenshot.gif" title="PAINT4x4Screenshot.gif" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought that the width=350 inserted picture would look the same - i.e., 350px - in both the larger and smaller output images since widthunit='pixel' was specified, but that's not the case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please comment on what I'm missing (be kind!)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p.s. In case it comes into play, my laptop resolution is 1366 x 768.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 08:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337743#M11743</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2017-03-03T08:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337878#M11753</link>
      <description>&lt;P&gt;Hi tc,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have found a bug. &amp;nbsp;We are looking into it. &amp;nbsp;But, basically the image size is being scaled by&amp;nbsp;a factor related to graph size specified to the "Design size" which is usually 640x480. &amp;nbsp;This happens even when we set NOSCALE on the ODS Graphics statement. &amp;nbsp;We are still digging and should have an answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to place an image behind the graph in the data area, I suggest DrawSpace=WallPercent. &amp;nbsp;Then placing it at (0, 0) with anchor of bottom right you will reliably get the image to fit the wall area regardless of the dpi or graph size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data anno;&lt;BR /&gt;length function $10; &lt;BR /&gt;function="Image"; &lt;BR /&gt;image="C:\Work\SASUser\Communities\Pgm\tc.png"; &lt;BR /&gt;anchor="bottomleft"; &lt;BR /&gt;layer='back'; &lt;BR /&gt;drawspace="wallpercent"; &lt;BR /&gt;x1=0; &lt;BR /&gt;y1=0;&lt;BR /&gt;width=100; &lt;BR /&gt;height=100;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods _all_ close; run; &lt;BR /&gt;ods listing image_dpi=200 gpath='C:\Work\SASUser\Communities\Image' device=png;&lt;BR /&gt;ods graphics on / reset width=4in height=3in antialias imagename="TEST4x3" imagefmt=png antialias;&lt;BR /&gt;proc sgplot data=sashelp.cars(obs=2) sganno=anno nowall; &lt;BR /&gt;scatter x=mpg_city y=mpg_highway;&lt;BR /&gt;xaxis min=0;&lt;BR /&gt;yaxis min=0;&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close; run;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 16:11:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337878#M11753</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-03-03T16:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ODS Graphics for $1,000, Alex: Width Parameter in ODS Graphics Image Annotation?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337971#M11757</link>
      <description>&lt;P&gt;Sounds good. Since I'm creating a fixed-size image (poster), and know what size I want the inserted photos to be, I actually considered going with&amp;nbsp;a percentage earlier.&amp;nbsp;Simple enough to change now, even if I was too stubborn to do so earlier. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 19:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-ODS-Graphics-for-1-000-Alex-Width-Parameter-in-ODS-Graphics/m-p/337971#M11757</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2017-03-03T19:43:56Z</dc:date>
    </item>
  </channel>
</rss>

