<?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: Any reference for Creating rectangle on x-axis and y-axis range %28-50 to 50%29 for both. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583360#M18751</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83446"&gt;@Sagarg&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Used SGPLOT polygon but it gives not whole rectangle form.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is usually a good idea to include the code you attempted and describe what you need that the code isn't doing.&lt;/P&gt;
&lt;P&gt;In the case of polygon the actual data step or file used is important.&lt;/P&gt;
&lt;P&gt;An improperly shaped polygon would likely result from a missing vertex or an ID variable misaligned with the x and y coordinates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 23:19:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-08-22T23:19:09Z</dc:date>
    <item>
      <title>Any reference for Creating rectangle on x-axis and y-axis range %28-50 to 50%29 for both.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583184#M18747</link>
      <description>&lt;P&gt;Used SGPLOT polygon but it gives not whole rectangle form.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 13:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583184#M18747</guid>
      <dc:creator>Sagarg</dc:creator>
      <dc:date>2019-08-22T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Any reference for Creating rectangle on x-axis and y-axis range %28-50 to 50%29 for both.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583202#M18748</link>
      <description>&lt;P&gt;Please post your code (and data, if you can) and explain what you are trying to accomplish.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it helps, the coordinates for the POLYGON statement are in the data coordinate system. So if you want a rectangle that goes from 28% of the data range to 50% of the data range, you can use PROC MEANS to compute the min and max values of the coordinates, then use a DATA step to create the rectangle corners, which will have the values&lt;/P&gt;
&lt;P&gt;XMin_Poly = XMin + 0.28*(XMax - XMin);&lt;/P&gt;
&lt;P&gt;XMax_Poly = XMin + 0.5*(XMax - XMin);&lt;/P&gt;
&lt;P&gt;The Y coordinates are computed similarly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 14:26:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583202#M18748</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-08-22T14:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Any reference for Creating rectangle on x-axis and y-axis range %28-50 to 50%29 for both.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583258#M18749</link>
      <description>&lt;P&gt;I too prefer using POLYGON plot in data coordinates as suggested by Rick.&amp;nbsp; This is good if you want the figures to be represented in the legend, or be displayed in correct order.&amp;nbsp; If this is not required, annotation is an alternative. In that case you can use SGAnnotation (or %SGANNO macros) in DataPercent drawspace.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 16:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583258#M18749</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2019-08-22T16:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Any reference for Creating rectangle on x-axis and y-axis range %28-50 to 50%29 for both.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583275#M18750</link>
      <description>&lt;P&gt;I had the same thought as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;&amp;nbsp;, because you can use DATAPERCENT as a drawing space. Here is a simple example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data anno;
length function $ 9 drawspace $ 11 anchor $ 10;
function="rectangle";
drawspace="datapercent";
anchor="bottomleft";
x1=28;
y1=29;
width=22;
height=21;
output;
run;

proc sgplot data=sashelp.class sganno=anno;
scatter x=weight y=height;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Aug 2019 17:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583275#M18750</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-08-22T17:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Any reference for Creating rectangle on x-axis and y-axis range %28-50 to 50%29 for both.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583360#M18751</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83446"&gt;@Sagarg&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Used SGPLOT polygon but it gives not whole rectangle form.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is usually a good idea to include the code you attempted and describe what you need that the code isn't doing.&lt;/P&gt;
&lt;P&gt;In the case of polygon the actual data step or file used is important.&lt;/P&gt;
&lt;P&gt;An improperly shaped polygon would likely result from a missing vertex or an ID variable misaligned with the x and y coordinates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 23:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Any-reference-for-Creating-rectangle-on-x-axis-and-y-axis-range/m-p/583360#M18751</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-22T23:19:09Z</dc:date>
    </item>
  </channel>
</rss>

