<?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 How do I standardize axis scale (log) for all graphs generated from a looped script? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-standardize-axis-scale-log-for-all-graphs-generated/m-p/56727#M31828</link>
    <description>&lt;P&gt;I'm trying to write a simple script that loops over columns and iteratively uses each column as the Y values in a plot. I think I've got the for loop down but I can't get the Y axis set to a log scale. The code runs but each graph that is generated is on a linear scale with a range that is specific for each column.&amp;nbsp; I'd like each graph to be on a log scale (either with a specifically set min/max or an automatically generated range based on the data).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cd = Current Data Table();
column_names = cd &amp;lt;&amp;lt; Get Column Names;

For ( i = 256, i &amp;lt;= 258, i++, 

Graph Builder(
	Size( 625, 660 ),
	Variables(
		X( :Day ),
		Y( Column( cd, column_names[i] ) ),
		Overlay( :Dose ),
	),
	Elements( Line( X, Y, Legend( 6 ) , Error Bars ("Standard Deviation") ) ),
	SendToReport(
		Dispatch(
			{},
			"Data Abs. Counts T CD56br" ,
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 12), Min( 0.002 ), Max( 16000 ),
			Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				6,
				Properties( 0, {Line Width( 2 )} ),
				Properties( 1, {Line Width( 2 )} ),
				Properties( 2, {Line Width( 2 )} ),
				Properties( 3, {Line Width( 2 )} ),
				Properties( 4, {Line Width( 2 )} )
			)}
		),
		Dispatch(
			{},
			"Y title",
			TextEditBox,
			{Set Text( Column(cd, column_names[i]))}
		)
	)
))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have read&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/m-p/54573#M30852" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/m-p/54573#M30852&lt;/A&gt; and am still stuck. I tried including ScaleBox(1) or ScaleBox(2) but couldn't even get the first or second graphs to be on a log scale. I am also trying the xPath solution but additional help would be great.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks so much!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bonus question:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;SendToReport(
		Dispatch(
			{},
			"Data Abs. Counts T CD56br" ,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What is the "Data Abs. Counts T CD56br" refering to here? That's one of my column names (but not&amp;nbsp;ALL of the column names!) that got copied/pasted and kept.&amp;nbsp; It seems to be running the way it should (aside from the scale thing) and changing it to other values (ie. "data") doesn't seem to break anything. What is this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 11:01:26 GMT</pubDate>
    <dc:creator>lakepotter</dc:creator>
    <dc:date>2023-06-11T11:01:26Z</dc:date>
    <item>
      <title>How do I standardize axis scale (log) for all graphs generated from a looped script?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-standardize-axis-scale-log-for-all-graphs-generated/m-p/56727#M31828</link>
      <description>&lt;P&gt;I'm trying to write a simple script that loops over columns and iteratively uses each column as the Y values in a plot. I think I've got the for loop down but I can't get the Y axis set to a log scale. The code runs but each graph that is generated is on a linear scale with a range that is specific for each column.&amp;nbsp; I'd like each graph to be on a log scale (either with a specifically set min/max or an automatically generated range based on the data).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cd = Current Data Table();
column_names = cd &amp;lt;&amp;lt; Get Column Names;

For ( i = 256, i &amp;lt;= 258, i++, 

Graph Builder(
	Size( 625, 660 ),
	Variables(
		X( :Day ),
		Y( Column( cd, column_names[i] ) ),
		Overlay( :Dose ),
	),
	Elements( Line( X, Y, Legend( 6 ) , Error Bars ("Standard Deviation") ) ),
	SendToReport(
		Dispatch(
			{},
			"Data Abs. Counts T CD56br" ,
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 12), Min( 0.002 ), Max( 16000 ),
			Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				6,
				Properties( 0, {Line Width( 2 )} ),
				Properties( 1, {Line Width( 2 )} ),
				Properties( 2, {Line Width( 2 )} ),
				Properties( 3, {Line Width( 2 )} ),
				Properties( 4, {Line Width( 2 )} )
			)}
		),
		Dispatch(
			{},
			"Y title",
			TextEditBox,
			{Set Text( Column(cd, column_names[i]))}
		)
	)
))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have read&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/m-p/54573#M30852" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/m-p/54573#M30852&lt;/A&gt; and am still stuck. I tried including ScaleBox(1) or ScaleBox(2) but couldn't even get the first or second graphs to be on a log scale. I am also trying the xPath solution but additional help would be great.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks so much!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bonus question:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;SendToReport(
		Dispatch(
			{},
			"Data Abs. Counts T CD56br" ,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What is the "Data Abs. Counts T CD56br" refering to here? That's one of my column names (but not&amp;nbsp;ALL of the column names!) that got copied/pasted and kept.&amp;nbsp; It seems to be running the way it should (aside from the scale thing) and changing it to other values (ie. "data") doesn't seem to break anything. What is this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:01:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-standardize-axis-scale-log-for-all-graphs-generated/m-p/56727#M31828</guid>
      <dc:creator>lakepotter</dc:creator>
      <dc:date>2023-06-11T11:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I standardize axis scale (log) for all graphs generated from a looped script?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-standardize-axis-scale-log-for-all-graphs-generated/m-p/56741#M31836</link>
      <description>&lt;P&gt;Actually, it turns out my problem really was the BONUS question. I had to change that name to char(column_names[i]) so that the following specs would apply to *that* graph.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So code that works is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cd = Current Data Table();
column_names = cd &amp;lt;&amp;lt; Get Column Names;

For ( i = 255, i &amp;lt;= 256, i++, 
gb = Graph Builder(
	Size( 625, 660 ),
	Variables(
		X( :Day ),
		Y( Column( cd, column_names[i] ) ),
		Overlay( :Patient ),
		Color( :Dose )
	),
	Elements( Line( X, Y, Legend( 6 ) ) ),
	SendToReport(
		Dispatch(
			{},
			Char(column_names[i]),
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 12 ), Min( 0.002 ), Max( 16000 ),
			Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				6,
				Properties( 0, {Line Width( 2 )} ),
				Properties( 1, {Line Width( 2 )} ),
				Properties( 2, {Line Width( 2 )} ),
				Properties( 3, {Line Width( 2 )} ),
				Properties( 4, {Line Width( 2 )} )
			)}
		),
		Dispatch(
			{},
			"Y title",
			TextEditBox,
			{Set Text( Column(cd, column_names[i]) )}
		)
	)
);

rgb = gb &amp;lt;&amp;lt; report;

rgb &amp;lt;&amp;lt; journal; 
	
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 May 2018 17:10:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-standardize-axis-scale-log-for-all-graphs-generated/m-p/56741#M31836</guid>
      <dc:creator>lakepotter</dc:creator>
      <dc:date>2018-05-09T17:10:26Z</dc:date>
    </item>
  </channel>
</rss>

