<?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 add another column of text to a graph? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362057#M61175</link>
    <description>&lt;P&gt;I failed to find a solution through the graphic code of "Big Class Families".&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(Size(535,455),
Variables(X(:row),Y(:height)),Elements(Line(X,Y,Legend(5))),
SendToReport(Dispatch({},"Graph Builder",FrameBox,
{Marker Size(2),{
Add Pin Annotation(Seg(Marker Seg(1)),Index(9),Index Row(9),UniqueID(1180683047),Origin({64.8386487250506,97.865127215503}),Offset({-239,8}),Tag Line)	
}})));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-02-24_16-28-57.png" style="width: 923px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30647iABEACF97564138D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-02-24_16-28-57.png" alt="2021-02-24_16-28-57.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 08:31:29 GMT</pubDate>
    <dc:creator>lwx228</dc:creator>
    <dc:date>2021-02-24T08:31:29Z</dc:date>
    <item>
      <title>How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362056#M61174</link>
      <description>&lt;P&gt;For example, use "Big Class.jmp".&lt;BR /&gt;A text column has been added as follows.&lt;BR /&gt;And make a graph, the need to graph the new column text in the graph display.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; New Column( "row", formula( Row() ) );
dt &amp;lt;&amp;lt; run formulas;
Column( "row" ) &amp;lt;&amp;lt; deleteFormula;
dt &amp;lt;&amp;lt; Add Multiple Columns( "A", 2, Character, "Nominal" );
Column( dt, N Col( dt ) - 1 ) &amp;lt;&amp;lt; set name( "max" );
Column( dt, N Col( dt ) ) &amp;lt;&amp;lt; set name( "min" );
Column( "max" ) &amp;lt;&amp;lt; Formula(
	If( height == Max( height[Index( Row() - 5, Row() + 5 )] ),
		name
	)
);
dt &amp;lt;&amp;lt; run formulas;
Column( "max" ) &amp;lt;&amp;lt; deleteFormula;
Column( "min" ) &amp;lt;&amp;lt; Formula(
	If( height == Min( height[Index( Row() - 5, Row() + 5 )] ),
		name
	)
);
dt &amp;lt;&amp;lt; run formulas;Column( "min" ) &amp;lt;&amp;lt; deleteFormula;

c1 = Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :row ), Y( :height ) ),
	Elements( Line( X, Y, Legend( 5 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-02-24_10-01-55.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30646iB9B3067B001CDB3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-02-24_10-01-55.png" alt="2021-02-24_10-01-55.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:06:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362056#M61174</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2023-06-09T22:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362057#M61175</link>
      <description>&lt;P&gt;I failed to find a solution through the graphic code of "Big Class Families".&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(Size(535,455),
Variables(X(:row),Y(:height)),Elements(Line(X,Y,Legend(5))),
SendToReport(Dispatch({},"Graph Builder",FrameBox,
{Marker Size(2),{
Add Pin Annotation(Seg(Marker Seg(1)),Index(9),Index Row(9),UniqueID(1180683047),Origin({64.8386487250506,97.865127215503}),Offset({-239,8}),Tag Line)	
}})));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-02-24_16-28-57.png" style="width: 923px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30647iABEACF97564138D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-02-24_16-28-57.png" alt="2021-02-24_16-28-57.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 08:31:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362057#M61175</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2021-02-24T08:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362094#M61177</link>
      <description>&lt;P&gt;This discussion might help:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/How-to-add-value-label-to-points/td-p/250584" target="_blank" rel="noopener"&gt;How to add value label to points?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 10:30:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362094#M61177</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-02-24T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362117#M61179</link>
      <description>&lt;P&gt;I think this is what you want.&amp;nbsp; It creates the graph with only the Max column showing the labels, and then adds the Min column and the new labels show up.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:name &amp;lt;&amp;lt; set labelled( 0 ); // Remove the default label

// Create the new row column
dt &amp;lt;&amp;lt; New Column( "row", formula( Row() ) );
dt &amp;lt;&amp;lt; run formulas;
Column( "row" ) &amp;lt;&amp;lt; deleteFormula;

// Add the first label column
dt &amp;lt;&amp;lt; New Column( "max", character,
	Formula(
		If( height == Max( height[Index( Row() - 5, Row() + 5 )] ),
			name
		)
	)
);
dt &amp;lt;&amp;lt; run formulas;
Column( "max" ) &amp;lt;&amp;lt; deleteFormula;
Column( "max" ) &amp;lt;&amp;lt; set labelled( 1 );
dt &amp;lt;&amp;lt; select where( :max != "" );
dt &amp;lt;&amp;lt; Label;
dt &amp;lt;&amp;lt; clear select;

// Run the graph
c1 = Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :row ), Y( :height ) ),
	Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) )
);
Report( c1 )[framebox( 1 )] &amp;lt;&amp;lt; Marker Size( 0 );

// Wait added to allow initial labeling before adding new labeling
Wait( 5 );

// Add new label column
dt &amp;lt;&amp;lt; New Column( "min", character,
	Formula(
		If( height == Min( height[Index( Row() - 5, Row() + 5 )] ),
			name
		)
	)
);
dt &amp;lt;&amp;lt; run formulas;
Column( "min" ) &amp;lt;&amp;lt; deleteFormula;
Column( "min" ) &amp;lt;&amp;lt; set labelled( 1 );
dt &amp;lt;&amp;lt; select labeled;
dt &amp;lt;&amp;lt; select where( :min != "", current selection( "extend" ) );
dt &amp;lt;&amp;lt; Label;
dt &amp;lt;&amp;lt; clear select;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2021 11:11:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362117#M61179</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-24T11:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362170#M61186</link>
      <description>&lt;P&gt;Thank Jim!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-02-24_21-13-35.png" style="width: 630px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30651i16647E74AB2802AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-02-24_21-13-35.png" alt="2021-02-24_21-13-35.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 13:15:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362170#M61186</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2021-02-24T13:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362451#M61228</link>
      <description>&lt;P&gt;How to use JSL to implement just will:the font for the "MAX" column is set to red.&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-02-25_07-23-32.png" style="width: 691px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30688i0D09BD77981B2422/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-02-25_07-23-32.png" alt="2021-02-25_07-23-32.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 23:32:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362451#M61228</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2021-02-24T23:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362480#M61233</link>
      <description>&lt;P&gt;By setting the RowState color to red for the rows where there are Max values, the displayed labels for those rows will be red.&amp;nbsp; I have added some code to the current script to handle the coloring.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:name &amp;lt;&amp;lt; set labelled( 0 ); // Remove the default label

// Create the new row column
dt &amp;lt;&amp;lt; New Column( "row", formula( Row() ) );
dt &amp;lt;&amp;lt; run formulas;
Column( "row" ) &amp;lt;&amp;lt; deleteFormula;

// Add the first label column
dt &amp;lt;&amp;lt; New Column( "max", character,
	Formula(
		If( height == Max( height[Index( Row() - 5, Row() + 5 )] ),
			name
		)
	)
);
dt &amp;lt;&amp;lt; run formulas;
Column( "max" ) &amp;lt;&amp;lt; deleteFormula;
Column( "max" ) &amp;lt;&amp;lt; set labelled( 1 );
dt &amp;lt;&amp;lt; select where( :max != "" );
selectedRows = dt &amp;lt;&amp;lt; get selected rows;
for(i=1,i&amp;lt;=NRows(selectedRows),i++,
	rowstate( selectedRows[i] ) = Color State ("red")
);
dt&amp;lt;&amp;lt;select where(:max !="");

dt &amp;lt;&amp;lt; Label;
dt &amp;lt;&amp;lt; clear select;

// Run the graph
c1 = Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :row ), Y( :height ) ),
	Elements( Line( X, Y, Legend( 5 ) ), Points( X, Y, Legend( 6 ) ) )
);
Report( c1 )[framebox( 1 )] &amp;lt;&amp;lt; Marker Size( 0 );

// Wait added to allow initial labeling before adding new labeling
Wait( 5 );

// Add new label column
dt &amp;lt;&amp;lt; New Column( "min", character,
	Formula(
		If( height == Min( height[Index( Row() - 5, Row() + 5 )] ),
			name
		)
	)
);
dt &amp;lt;&amp;lt; run formulas;
Column( "min" ) &amp;lt;&amp;lt; deleteFormula;
Column( "min" ) &amp;lt;&amp;lt; set labelled( 1 );
dt &amp;lt;&amp;lt; select labeled;

dt &amp;lt;&amp;lt; select where( :min != "", current selection( "extend" ) );
dt &amp;lt;&amp;lt; Label;
dt &amp;lt;&amp;lt; clear select;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Feb 2021 02:43:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/362480#M61233</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-25T02:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/697885#M88335</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;How can I modify the interval markers to use different colors?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Big Class.jmp uses this script to plot, "B" lists the height values of different ages by the number of rows to start and end.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The "B" column data that needs to be marked with the value of this B column as the interval, but requires the number of rows at the end of the age, is marked in red.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;Thank Jim!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Sort( By( age ), Order( Ascending ), replace table );
ca = "B";
r = N Row( dt );
New Column( ca );
Column( ca ) &amp;lt;&amp;lt; Formula( If( Row() == r | Row() == 1 | age != Lag( age, 1 ) | age != Lag( age, -1 ), height ) );
dt &amp;lt;&amp;lt; run formulas;
Column( ca ) &amp;lt;&amp;lt; deleteFormula;

p1 = dt &amp;lt;&amp;lt; Graph Builder(
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ), Interval( :B ) ),
	Elements( Bar( X, Y, Legend( 7 ), Response Axis( "X" ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-11-14_22-06-35.png" style="width: 940px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58682i003F112087331129/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-11-14_22-06-35.png" alt="2023-11-14_22-06-35.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 14:18:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/697885#M88335</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-11-14T14:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/698019#M88352</link>
      <description>&lt;P&gt;By default, in JMP 17, the error bars take on the color specified by the "Color" variable.&amp;nbsp; In previous versions, the color was only determined by the color setting in the Customize Graph window.&amp;nbsp; However, only one color can be used.&amp;nbsp; Therefore, if you set the Error Bar color to Red, both the error bars for M and F would be red.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 17:40:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/698019#M88352</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-11-14T17:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can add another column of text to a graph?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/698109#M88363</link>
      <description>&lt;P&gt;OK、Thank Jim!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 23:36:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-add-another-column-of-text-to-a-graph/m-p/698109#M88363</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-11-14T23:36:17Z</dc:date>
    </item>
  </channel>
</rss>

