<?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: GTL: DRAWRECTANGLE wrong position on Log scale in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679882#M20423</link>
    <description>&lt;P&gt;Why, not exactly sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking through the documentation there are lots of interactions that seem to be possible between the axis definition and height and data units. I was actually wondering why there wasn't a Y2 value option to specify the second Y value of the rectangle instead of this sort of offset with "units".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach might be use a bandplot instead of the rectangle but since that would likely require modification to the base data that may not be quite as flexible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 19:24:00 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-08-27T19:24:00Z</dc:date>
    <item>
      <title>GTL: DRAWRECTANGLE wrong position on Log scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679804#M20420</link>
      <description>&lt;P&gt;I recently want to create an reference area from Y-axis 1 to 8 by using GTL. My codes worked for Linear Scale&lt;/P&gt;&lt;P&gt;(left side)&amp;nbsp;but not for Log Scale (right side). It would be really appreciate if anyone knows how to correct it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.jpg" style="width: 768px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48723iD0251DC70A4CB810/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.jpg" alt="Untitled.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
	infile datalines missover;
	input time value yreflower yrefupper ;
	yrefrange = yrefupper - yreflower;
	datalines;           
0 0.1 1 8
1 0.2 1 8
2 0.5 1 8
3 1.2 1 8
4 5 1 8
5 10 1 8
6 100 1 8
; 
run;

***** GTL *****;
proc template;
define statgraph Simple_Layout_Graphs/store=work.templat;
	begingraph;
		layout lattice / columns=2;

			layout overlay /yaxisopts=(label='Linear Scale' linearopts=(viewmin=0  minorticks=true THRESHOLDMAX=1 THRESHOLDMIN=1)) WALLDISPLAY=NONE;
				scatterplot x=time y=value;
				referenceline y=yrefupper/ lineattrs=(color=black pattern=dash thickness=1);
				referenceline y=yreflower/ lineattrs=(color=black pattern=dash thickness=1);
				drawrectangle x=0 y=1 width=100 height=7 /display=(FILL) fillattrs=(color=green) transparency=0.75 anchor=bottomleft  
							 	 xspace=wallpercent widthunit=percent yspace=datavalue heightunit=data;
			endlayout;


			layout overlay /yaxisopts=(label='Semi-Log Scale' type=log logopts=(base=10 tickintervalstyle=logexpand minorticks=true THRESHOLDMAX=1 THRESHOLDMIN=1)) WALLDISPLAY=NONE;
				scatterplot x=time y=value;
				referenceline y=yrefupper/ lineattrs=(color=black pattern=dash thickness=1);
				referenceline y=yreflower/ lineattrs=(color=black pattern=dash thickness=1);
				drawrectangle x=0 y=1 width=100 height=7 /display=(FILL) fillattrs=(color=green) transparency=0.75 anchor=bottomleft  
							 	 xspace=wallpercent widthunit=percent yspace=datavalue heightunit=data;
			endlayout;

		endlayout;
	endgraph;
end;

title;
footnote;

ods graphics / OUTPUTFMT=PNG noborder width=8in height=4in;

proc sgrender data=have template=Simple_Layout_Graphs;
run;&lt;/PRE&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 16:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679804#M20420</guid>
      <dc:creator>MINX</dc:creator>
      <dc:date>2020-08-27T16:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: GTL: DRAWRECTANGLE wrong position on Log scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679819#M20421</link>
      <description>&lt;P&gt;Try height= 0.7 in the log section.&lt;/P&gt;
&lt;P&gt;Since height=7 maps to 70 on the axis and your log base is 10 ...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 17:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679819#M20421</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-27T17:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: GTL: DRAWRECTANGLE wrong position on Log scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679853#M20422</link>
      <description>&lt;P&gt;Thank you. Height=0.7 works. But I do not understand why height needs change by 10 times smaller. I set heightunit=data, why&amp;nbsp;it still be&amp;nbsp;mapped to 70? I&amp;nbsp;thought&amp;nbsp;log base=10 is only&amp;nbsp;for the&amp;nbsp;axis&amp;nbsp;scale display. Does it also&amp;nbsp;affect the&amp;nbsp;data mapping? I would be very happy if you&amp;nbsp;have any further reference&amp;nbsp;about&amp;nbsp;this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 18:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679853#M20422</guid>
      <dc:creator>MINX</dc:creator>
      <dc:date>2020-08-27T18:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: GTL: DRAWRECTANGLE wrong position on Log scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679882#M20423</link>
      <description>&lt;P&gt;Why, not exactly sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking through the documentation there are lots of interactions that seem to be possible between the axis definition and height and data units. I was actually wondering why there wasn't a Y2 value option to specify the second Y value of the rectangle instead of this sort of offset with "units".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach might be use a bandplot instead of the rectangle but since that would likely require modification to the base data that may not be quite as flexible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 19:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679882#M20423</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-27T19:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: GTL: DRAWRECTANGLE wrong position on Log scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679884#M20424</link>
      <description>Thank you for your help.</description>
      <pubDate>Thu, 27 Aug 2020 19:32:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-DRAWRECTANGLE-wrong-position-on-Log-scale/m-p/679884#M20424</guid>
      <dc:creator>MINX</dc:creator>
      <dc:date>2020-08-27T19:32:12Z</dc:date>
    </item>
  </channel>
</rss>

