<?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: Calculate the necessary height of a graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719638#M21054</link>
    <description>&lt;P&gt;Are you using SAS/Graph (gchart), or ODS Graphics (sgplot), or other?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2021 14:00:58 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2021-02-16T14:00:58Z</dc:date>
    <item>
      <title>Calculate the necessary height of a graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719550#M21050</link>
      <description>&lt;P&gt;I've got a couple of different barchartparm -templates used by a report. All resulting graphs are horizontal barcharts but some are grouped and some are not.&lt;/P&gt;
&lt;P&gt;I need for all the bars in the different graphs in the report to have the same thickness.&lt;/P&gt;
&lt;P&gt;I'm working om a macro that sets the height of each graph depending on the data sent to the template at runtime (How many groups, how many category values). I'm having a bit of trouble getting it right though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking for tips/ideas or possibly a detailed paper on how sas manages/divides the space available?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 08:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719550#M21050</guid>
      <dc:creator>andypandy_swe</dc:creator>
      <dc:date>2021-02-16T08:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the necessary height of a graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719557#M21052</link>
      <description>&lt;P&gt;Since the basic parameter that you would set is BARWIDTH in BARCHARTPARM statement, which &lt;/P&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV class="xis-refDictEntry"&gt;
&lt;DIV class="xis-syntax"&gt;
&lt;DIV class="xis-generatedOptionCategoryList"&gt;
&lt;P class="xis-shortDescription"&gt;specifies the width of a bar as a ratio of the maximum possible width. If you would be calculating a number of "graph heights"&amp;nbsp; for different graphs you would be calculating a different BARWIDTH for each size graph, requiring as a minimum the exact number of bars that will appear in each graph and calculating for multiple graphs my get quite tedious to manage. How many different graphs are you talking, with how many bars each?&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;Personally I find that somewhat distracting, having many graphs of different sizes. I would be strongly tempted to settle on one size or possibly two if at all practical so there are fewer things to try to keep track of.&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;If the primary concern is the bar thickness you might consider using a VECTOR plot instead with a origin of your axis (vertical or horizontal) which would require adding an xorigin yorigin pair for each bar. That supports either the LINEATTRS with a thickness attribute or the LINETHICKNESSRESPONSE= option that lets you use a variable to control thickness as a specified dimension. You would use ARROWHEADS=False to not display arrows.&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xis-shortDescription"&gt;If this is for publication you may run into graph size rules to consider first before even going down this path.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Feb 2021 09:13:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719557#M21052</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-16T09:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the necessary height of a graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719631#M21053</link>
      <description>&lt;P&gt;One way to do this automatically is to use the SGPANEL procedure.&amp;nbsp; The PANELBY statement has the option - PROPORTIONAL.&amp;nbsp; This is useful for discrete chart case, and each panel in the graph is sized differently to maintain the same bar width.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also set the ROWS option to output only one row per output graph.&amp;nbsp; You just have to set up your data&amp;nbsp; with a classification variable.&amp;nbsp; Maybe you can leverage this to create your graphs.&amp;nbsp; Just a thought...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0wqazuv6959fnn1fask7mi68lla.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0wqazuv6959fnn1fask7mi68lla.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 13:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719631#M21053</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2021-02-16T13:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the necessary height of a graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719638#M21054</link>
      <description>&lt;P&gt;Are you using SAS/Graph (gchart), or ODS Graphics (sgplot), or other?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 14:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719638#M21054</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-02-16T14:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the necessary height of a graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719656#M21055</link>
      <description>&lt;P&gt;SAS/Graph&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 15:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719656#M21055</guid>
      <dc:creator>andypandy_swe</dc:creator>
      <dc:date>2021-02-16T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the necessary height of a graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719909#M21057</link>
      <description>&lt;P&gt;If you're using SAS/Graph (proc gchart), then I don't think the solutions posted so far will work for you.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 14:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Calculate-the-necessary-height-of-a-graph/m-p/719909#M21057</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-02-17T14:31:07Z</dc:date>
    </item>
  </channel>
</rss>

