<?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: How can I set the orientation of the labels in the horizontal axis of the distribution histogram to be perpendicular to all the histograms? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/444350#M69229</link>
    <description>&lt;P&gt;Thanks Jim that worked perfectly&lt;/P&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:01:42 GMT</pubDate>
    <dc:creator>breino</dc:creator>
    <dc:date>2021-12-12T03:01:42Z</dc:date>
    <item>
      <title>How can I set the orientation of the labels in the horizontal axis of the distribution histogram to be perpendicular to all the histograms?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/443181#M69136</link>
      <description>&lt;P&gt;I am trying to change the orientation of the labels and the format (Engineering SI) for the horizontal axis in the Distribution (histograms) plots. I can do it for the first one using a dispatch statement within the expression that I am building but I need to be able to do it for all of the histograms in the column list.&lt;/P&gt;&lt;P&gt;I tried inserting different types of calls to the column name between the "{}" in:&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;Dispatch( {},&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;but none cause the histograms to change. It works if I literally put the column name (i.e. {"My Column"}) only but I want it to do it for all names in the&amp;nbsp;colList array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = currentdatatable();

col = dt &amp;lt;&amp;lt; get column names();
nc = N Items( col );
colList = {};
bin_width={};

For( i = 1, i &amp;lt;= nc, i++,
	If(Contains (col[i],"::"),
	Insert Into( colList, col[i] ))
);


For(i = 1, i &amp;lt;= N Items(colList), i++,
	Insert Into(bin_width,0.0);
	bin_width[i] = Col Max(Column(dt, colList[i])) - Col Min(Column(dt, colList[i]));
	bin_width[i] = bin_width[i]/10;
);


theExpr = "dis = dt &amp;lt;&amp;lt; Distribution(Stack( 1 ),
	Continuous Distribution( column( column(dt,colList[1])), Set Bin Width(bin_width[1]), Label Row( Label Orientation( \!"Perpendicular\!" ) ))
	";

For( i = 2, i &amp;lt; N Items( colList ), i++,
	theExpr = theExpr || ", Continuous Distribution( column( column(dt, colList[" || Char( i ) || "])), Set Bin Width(bin_width[i]))"
);


theExpr = theExpr || ",
	SendToReport(
		Dispatch(
			{},
			\!"1\!",
			ScaleBox,
			{Format( \!"Engineering SI\!", 10 ), Minor Ticks( 0 ),
			Label Row( Label Orientation( \!"Perpendicular\!" ) )}
		)
);";

Eval( Parse( theExpr ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:06:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/443181#M69136</guid>
      <dc:creator>breino</dc:creator>
      <dc:date>2023-06-09T18:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set the orientation of the labels in the horizontal axis of the distribution histogram to be perpendicular to all the histograms?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/443204#M69137</link>
      <description>&lt;P&gt;Here is the approach I would take&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = currentdatatable();

col = dt &amp;lt;&amp;lt; get column names();
nc = N Items( col );
colList = {};
bin_width={};

For( i = 1, i &amp;lt;= nc, i++,
	If(Contains (col[i],"::"),
	Insert Into( colList, col[i] ))
);

For(i = 1, i &amp;lt;= N Items(colList), i++,
	Insert Into(bin_width,0.0);
	bin_width[i] = Col Max(Column(dt, colList[i])) - Col Min(Column(dt, colList[i]));
	bin_width[i] = bin_width[i]/10;
);


theExpr = "dis = dt &amp;lt;&amp;lt; Distribution(Stack( 1 ),
	Continuous Distribution( column( column(dt,colList[1])), Set Bin Width(bin_width[1]), Label Row( Label Orientation( \!"Perpendicular\!" ) ))
	";

For( i = 1, i &amp;lt; N Items( colList ), i++,
	theExpr = theExpr || ", Continuous Distribution( column( column(dt, colList[" || Char( i ) || "])), Set Bin Width(bin_width[i]))"
);

Eval( Parse( theExpr ) );

(dis &amp;lt;&amp;lt; xpath("//AxisBox")) &amp;lt;&amp;lt; format("Engineering SI", 10);
(dis &amp;lt;&amp;lt; xpath("//AxisBox")) &amp;lt;&amp;lt; Minor Ticks( 0 );
(dis &amp;lt;&amp;lt; xpath("//AxisBox")) &amp;lt;&amp;lt; Label Row( Label Orientation( "Perpendicular" ));

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Dec 2021 06:36:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/443204#M69137</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-12-08T06:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set the orientation of the labels in the horizontal axis of the distribution histogram to be perpendicular to all the histograms?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/444350#M69229</link>
      <description>&lt;P&gt;Thanks Jim that worked perfectly&lt;/P&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:01:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-set-the-orientation-of-the-labels-in-the-horizontal/m-p/444350#M69229</guid>
      <dc:creator>breino</dc:creator>
      <dc:date>2021-12-12T03:01:42Z</dc:date>
    </item>
  </channel>
</rss>

