<?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: Second Y-Axis with different scaling in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/567775#M77862</link>
    <description>I suggest you unselected your "hardware acceleration" for your graphics</description>
    <pubDate>Thu, 10 Nov 2022 13:55:00 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-11-10T13:55:00Z</dc:date>
    <item>
      <title>Second Y-Axis with different scaling</title>
      <link>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/560394#M77378</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I'm quite new to JMP and have a question regarding plotting your data. Assume you measure a variable that can have different units (e.g. wavelength and energy). I would like to plot the data with one scaling on the left y-axis and the other on the right. I tried inserting a "Formula"-column in the graph builder and move it to the right axis. But that doesn't really do the job, because the axes aren't linked that way.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:28:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/560394#M77378</guid>
      <dc:creator>Felixxx</dc:creator>
      <dc:date>2023-06-11T11:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Second Y-Axis with different scaling</title>
      <link>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/560472#M77379</link>
      <description>&lt;P&gt;Here is an example where the left and right axes are linked in Graph Builder&amp;nbsp; All that is needed is to add a simple script to Graph Builder which checks for changes either the left or right axes and then resets the linked axes.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1666793588467.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46582i09C33E1F560A99E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1666793588467.png" alt="txnelson_0-1666793588467.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1666793632541.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/46583iEA978087C6EADE09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1666793632541.png" alt="txnelson_1-1666793632541.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create Sample Table
dt = New Table( "Linked",
	Add Rows( 100 ),
	New Column( "Fahrenheit",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[95, 30, 103, 76, -36, 18, -13, 52, 122, 84, -13, 97, 10, -21, 37, 86,
			102, 10, 38, 56, 81, 91, 21, -13, 47, 34, -22, 28, 41, 88, 58, -8, 22,
			119, 48, 37, 16, -18, 79, 51, 46, 1, 37, 13, -25, 45, 62, 125, 1, 26, 63,
			49, -22, 121, 4, 113, 104, 57, 1, -30, 46, -7, 92, 101, 29, 79, 33, 108,
			11, 60, 21, -35, -33, 39, 80, 8, -29, 113, 130, 41, 76, 60, 108, -17, 43,
			-37, 127, 119, 37, -5, 13, 90, 13, -40, 94, 49, 28, -14, 115, 58]
		)
	),
	New Column( "Celsius",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( (5 * (:Fahrenheit - 32)) / 9 )
	),
	New Column( "X",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[66, 89, 6, 85, 41, 42, 54, 10, 47, 43, 78, 35, 12, 92, 87, 57, 89, 12,
			42, 27, 21, 82, 21, 16, 45, 100, 49, 97, 37, 95, 100, 72, 23, 57, 25, 37,
			1, 32, 53, 48, 35, 43, 61, 52, 34, 65, 93, 78, 34, 84, 55, 47, 76, 22,
			10, 1, 57, 47, 34, 11, 97, 20, 4, 15, 37, 85, 99, 26, 26, 38, 20, 31, 66,
			79, 79, 49, 59, 97, 87, 55, 76, 96, 47, 79, 68, 33, 24, 38, 8, 75, 19,
			70, 48, 43, 95, 74, 1, 51, 85, 23]
		)
	)
);

// Run Graph Builder
gb = Graph Builder(
	Size( 528, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :X ), Y( :Fahrenheit ), Y( :Celsius, Position( 1 ), Side( "Right" ) ) ),
	Elements(
		Points( X, Y( 1 ), Legend( 14 ) ),
		Smoother( X, Y( 1 ), Legend( 15 ) ),
		Points( X, Y( 2 ), Legend( 16 ) ),
		Smoother( X, Y( 2 ), Legend( 17 ) )
	)
);
gbr = gb &amp;lt;&amp;lt; report;

//Initialize the critical axis values 
fmax = gbr[axisbox( 2 )] &amp;lt;&amp;lt; get max;
fmin = gbr[axisbox( 2 )] &amp;lt;&amp;lt; get min;
cmax = gbr[axisbox( 3 )] &amp;lt;&amp;lt; get max;
cmin = gbr[axisbox( 3 )] &amp;lt;&amp;lt; get min;
fmaxh = fmax;
fminh = fmin;
cmaxh = cmax;
cminh = cmin;

// Check for change and if found, reset alternate axis
gbr[framebox( 1 )] &amp;lt;&amp;lt; add graphics script(
	fmax = gbr[axisbox( 2 )] &amp;lt;&amp;lt; get max;
	fmin = gbr[axisbox( 2 )] &amp;lt;&amp;lt; get min;
	cmax = gbr[axisbox( 3 )] &amp;lt;&amp;lt; get max;
	cmin = gbr[axisbox( 3 )] &amp;lt;&amp;lt; get min;
	If( cmax != cmaxh | cmin != cminh,
		gbr[axisbox( 2 )] &amp;lt;&amp;lt; max( (9 * cmax) / 5 + 32 );
		gbr[axisbox( 2 )] &amp;lt;&amp;lt; min( (9 * cmin) / 5 + 32 );
	);
	If( fmax != fmaxh | fmin != fminh,
		gbr[axisbox( 3 )] &amp;lt;&amp;lt; max( (5 * (fmax - 32)) / 9 );
		gbr[axisbox( 3 )] &amp;lt;&amp;lt; min( (5 * (fmin - 32)) / 9 );
	);
	fmaxh = fmax;
	fminh = fmin;
	cmaxh = cmax;
	cminh = cmin;
)
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 14:16:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/560472#M77379</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-10-26T14:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Second Y-Axis with different scaling</title>
      <link>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/567729#M77857</link>
      <description>&lt;P&gt;Hello thank you very much for your solution. In general it works, there is only one bug I'm facing: when changing the scale using the mouse key, the axis labels start to flicker. Do you have an idea where this may come from?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 12:59:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/567729#M77857</guid>
      <dc:creator>Felixxx</dc:creator>
      <dc:date>2022-11-10T12:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Second Y-Axis with different scaling</title>
      <link>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/567775#M77862</link>
      <description>I suggest you unselected your "hardware acceleration" for your graphics</description>
      <pubDate>Thu, 10 Nov 2022 13:55:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Second-Y-Axis-with-different-scaling/m-p/567775#M77862</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-11-10T13:55:00Z</dc:date>
    </item>
  </channel>
</rss>

