<?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: Density axis: How to access it in the Distribution platform (i.e. histogram)? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236779#M46732</link>
    <description>&lt;P&gt;If you specify to turn on the Density Axis for the histogram, you can access the Axis Settings for Axis Box(2)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dist=Distribution( Continuous Distribution( Column( :height ), Density Axis( 1 ) ) );

report(dist)[AxisBox(2)]&amp;lt;&amp;lt;get max;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Nov 2019 23:01:11 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-11-27T23:01:11Z</dc:date>
    <item>
      <title>Density axis: How to access it in the Distribution platform (i.e. histogram)?</title>
      <link>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236769#M46731</link>
      <description>&lt;P&gt;I commonly add text onto graphs using "Add graphics script". I prefer to script it which means specifying x and y coordinates so the text appears in a good place on the graph.&lt;/P&gt;
&lt;P&gt;I am stuck with histograms (in the Distribution platform) because I don't know how to get the y-axis scale which is based on the density axis. The x-axis is easy enough - it is based on the original data - but I need both x and y for my added text to appear in a meaningful place.&lt;/P&gt;
&lt;P&gt;An example simple script is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dist = Distribution(
	Continuous Distribution( Column( :C1 ), Horizontal Layout( 1 ), Vertical( 0 ) ),
	Histograms Only
);

rdist = dist &amp;lt;&amp;lt; report; // rdist &amp;lt;&amp;lt; Show Tree Structure;

axis_box = rdist[axis box( 1 )];
x_max = axis_box &amp;lt;&amp;lt; Get Max; // show(x_max);

framebox = rdist[frame box( 1 )];
framebox &amp;lt;&amp;lt; Add Graphics Script(
	Text Color( "red" );
	Text( Center Justified, {0.98 * x_max, 0.4}, "centered" ); // 0.4 is the y-value, but how to know the density axis scale?
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anybody help? i.e. how to access details of the histogram's density axis so I can get the relevant information and then script where my desired text appears on the graph?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 15:55:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236769#M46731</guid>
      <dc:creator>scottahindle</dc:creator>
      <dc:date>2019-12-02T15:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Density axis: How to access it in the Distribution platform (i.e. histogram)?</title>
      <link>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236779#M46732</link>
      <description>&lt;P&gt;If you specify to turn on the Density Axis for the histogram, you can access the Axis Settings for Axis Box(2)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dist=Distribution( Continuous Distribution( Column( :height ), Density Axis( 1 ) ) );

report(dist)[AxisBox(2)]&amp;lt;&amp;lt;get max;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 23:01:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236779#M46732</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-11-27T23:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Density axis: How to access it in the Distribution platform (i.e. histogram)?</title>
      <link>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236801#M46735</link>
      <description>&lt;P&gt;Thanks for the hint.&lt;/P&gt;
&lt;P&gt;I turn on the density access at the start of the script so I can pull the min/max values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once these values are in the list - that will lead me to the coordinates I need - I simply remove the density access from the display:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dist &amp;lt;&amp;lt; density axis(0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks again, Scott.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 15:56:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Density-axis-How-to-access-it-in-the-Distribution-platform-i-e/m-p/236801#M46735</guid>
      <dc:creator>scottahindle</dc:creator>
      <dc:date>2019-12-02T15:56:19Z</dc:date>
    </item>
  </channel>
</rss>

