<?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 to write a script to use a specific row for plot bar chart? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67341#M34595</link>
    <description>&lt;P&gt;Thank you for your reply, Jim!&lt;BR /&gt;I don't get what "values( dt[0, 5] )" means here though. How can I just select the row that I want for the plot? For example, in my case, I only want to select row 132 as numeric values in y-axis for the plot and the names of the columns as the categorical names in the x-axis. Expected plot is as the following:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="figure.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11924i369CBFB4FC066BF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="figure.png" alt="figure.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2018 17:04:48 GMT</pubDate>
    <dc:creator>vistacc</dc:creator>
    <dc:date>2018-08-09T17:04:48Z</dc:date>
    <item>
      <title>How to write a script to use a specific row for plot bar chart?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67331#M34590</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to plot a bar chart using a specific row in the data table. The format of the table is as following:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="photo.png" style="width: 736px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11923i7065B6928E0D5E66/image-size/large?v=v2&amp;amp;px=999" role="button" title="photo.png" alt="photo.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure what is the best way to do it.&lt;/P&gt;&lt;P&gt;My thought is to select the row, save it to a new data table, transpose the new table and then use the two columns in the new data table to plot the bar. The script for this method is a little bit long so I would like to know whether there is a more simple way for it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 16:00:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67331#M34590</guid>
      <dc:creator>vistacc</dc:creator>
      <dc:date>2018-08-09T16:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to use a specific row for plot bar chart?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67334#M34592</link>
      <description>&lt;P&gt;Here is a simple example of one way to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/blood pressure.jmp" );
dt &amp;lt;&amp;lt; delete columns( 1, 2 );


dt2 = New Table( "example", New Column( "transpose", values( dt[0, 5] ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 16:15:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67334#M34592</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-08-09T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to use a specific row for plot bar chart?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67341#M34595</link>
      <description>&lt;P&gt;Thank you for your reply, Jim!&lt;BR /&gt;I don't get what "values( dt[0, 5] )" means here though. How can I just select the row that I want for the plot? For example, in my case, I only want to select row 132 as numeric values in y-axis for the plot and the names of the columns as the categorical names in the x-axis. Expected plot is as the following:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="figure.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11924i369CBFB4FC066BF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="figure.png" alt="figure.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 17:04:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67341#M34595</guid>
      <dc:creator>vistacc</dc:creator>
      <dc:date>2018-08-09T17:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a script to use a specific row for plot bar chart?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67349#M34599</link>
      <description>&lt;P&gt;The "values( dt[0, 5] )" refers to the values to be placed into the data table.&amp;nbsp; The "dt[0,5]" referred to the 5th row in the data table.&amp;nbsp; It actually was an error in my code, it should have been, "values( dt[5, 0] )".&amp;nbsp; The "0" refers to all columns in the data table.&amp;nbsp; I have changed my code below to meet the new requirement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/blood pressure.jmp" );
dt &amp;lt;&amp;lt; delete columns( 1, 2 );

rowNum = 5;

colNames = dt &amp;lt;&amp;lt; get column names(string);


dt2 = New Table( "example",
	New Column( "Label", character, values( colNames ) ),
	New Column( "Row " || char( rowNum ), values( dt[rowNum, 0 ] ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 17:42:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-write-a-script-to-use-a-specific-row-for-plot-bar-chart/m-p/67349#M34599</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-08-09T17:42:26Z</dc:date>
    </item>
  </channel>
</rss>

