<?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: Overlay with yaxis and y2axis using same zero in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184515#M6794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;This should be doable by setting MIN =0 on both Y and Y2 axes..&amp;nbsp; You could also set OFFSETMIN=0 for both&amp;nbsp; Y and Y2 axes to ensure the needles touch the X axis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Feb 2014 18:38:23 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2014-02-24T18:38:23Z</dc:date>
    <item>
      <title>Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184514#M6793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building an overlay layout that has needle plots for trades and bandplots for cumulative positions.&amp;nbsp; The positions can grow to overshadow the trades, making the needles tiny, so I've placed trades on the yaxis and the position on the y2axis.&amp;nbsp; I'd like the zero value of the y axes to be the same, i.e. that the axes are scaled differently, but "pinned" to a common ground.&amp;nbsp; Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 18:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184514#M6793</guid>
      <dc:creator>jdmarino</dc:creator>
      <dc:date>2014-02-24T18:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184515#M6794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;This should be doable by setting MIN =0 on both Y and Y2 axes..&amp;nbsp; You could also set OFFSETMIN=0 for both&amp;nbsp; Y and Y2 axes to ensure the needles touch the X axis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 18:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184515#M6794</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-02-24T18:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184516#M6795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, but zero is in the middle: trades and positions can be positive or negative.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 18:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184516#M6795</guid>
      <dc:creator>jdmarino</dc:creator>
      <dc:date>2014-02-24T18:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184517#M6796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aah.&amp;nbsp; Interesting.&amp;nbsp; Then I suggest set the MIN and MAX for both Y and Y2 in the same proportion.&amp;nbsp; So, if for band (on Y) the min= -100 and max= +200, then make the min and max for the needle (on Y2) in the same proportion.&amp;nbsp; So, if&amp;nbsp; the needle min= -20 and max=+20, make Y2 min= -20 and max=+40.&amp;nbsp; I believe this should set the zero at the same place for both axes.&amp;nbsp; Place a reference line for Y=0 and see how it lines up with Y2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Synch.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4987_Synch.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;data synch;&lt;BR /&gt;&amp;nbsp; do x=1 to 10 by 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; y1=10*rannor(2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; y2=rannor(2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=synch cycleattrs;&lt;BR /&gt;&amp;nbsp; series x=x y=y1;&lt;BR /&gt;&amp;nbsp; needle x=x y=y2 / y2axis;&lt;BR /&gt;&amp;nbsp; refline 0;&lt;BR /&gt;&amp;nbsp; yaxis min=-10 max=20;&lt;BR /&gt;&amp;nbsp; y2axis min=-2 max=4 valueattrs=graphdata2 labelattrs=graphdata2;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 19:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184517#M6796</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-02-24T19:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184518#M6797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I guess I did not overlook the built-in option for this to does it automagically.&lt;/P&gt;&lt;P&gt;I don't want to hard code these values, and detecting them and scaling sounds like a fair bit of effort.&amp;nbsp; I'm using proc template and I'd have to pass some dynamic or macro vars, which I find troublesome (i.e. I have trouble getting them to work).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 19:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184518#M6797</guid>
      <dc:creator>jdmarino</dc:creator>
      <dc:date>2014-02-24T19:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184519#M6798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, automatic solution at this time.&amp;nbsp; Yes, you can use some logic to compute the min and max values in macro variables, and set on the axis.&amp;nbsp; Alternately, do you have to use overlaid plots?&amp;nbsp; Could you place each plot in its own graph, with a common x axis.&amp;nbsp; Or, use the Waterfall chart, where each observation is a transaction and the cumulative result is automatically computed.&amp;nbsp; Waterfall is available in SG, but to create a two cell graph with common X axis, you need GTL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 20:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184519#M6798</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-02-24T20:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay with yaxis and y2axis using same zero</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184520#M6799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again for all the help.&amp;nbsp; I don't have to use overlaid charts, and I think that's the best option.&amp;nbsp; Waterfall may work, so long as I can give it a starting base value.&amp;nbsp; (The graph actually has needles for two kinds of trading [stocks and swaps], a band for each, and a seriesplot fo the total cumulative position.&amp;nbsp; I'm not inclined to ditch it all at this point.)&amp;nbsp; It's interesting that so many chart types can be transformed to server other purposes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 21:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlay-with-yaxis-and-y2axis-using-same-zero/m-p/184520#M6799</guid>
      <dc:creator>jdmarino</dc:creator>
      <dc:date>2014-02-24T21:25:14Z</dc:date>
    </item>
  </channel>
</rss>

