<?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 to generate a data table through a graph which is a plot of some data? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391034#M64119</link>
    <description>&lt;P&gt;if I only have a photo graph which is a plot of some data, but not have a its original raw data. can help to suggest how to generate a data set use this graph?&lt;/P&gt;&lt;P&gt;My purpose is to generate a data set that can represent its profile, and join with others then can do a new plot to combine all togehter.&lt;/P&gt;&lt;P&gt;can use jmp script or through its basic function tools? thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qspringleaf_1-1622996228420.png" style="width: 640px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33300i4DE1ABDC20B74778/image-dimensions/640x368?v=v2" width="640" height="368" role="button" title="qspringleaf_1-1622996228420.png" alt="qspringleaf_1-1622996228420.png" /&gt;&lt;/span&gt;&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:14:31 GMT</pubDate>
    <dc:creator>qspringleaf</dc:creator>
    <dc:date>2023-06-11T11:14:31Z</dc:date>
    <item>
      <title>how to generate a data table through a graph which is a plot of some data?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391034#M64119</link>
      <description>&lt;P&gt;if I only have a photo graph which is a plot of some data, but not have a its original raw data. can help to suggest how to generate a data set use this graph?&lt;/P&gt;&lt;P&gt;My purpose is to generate a data set that can represent its profile, and join with others then can do a new plot to combine all togehter.&lt;/P&gt;&lt;P&gt;can use jmp script or through its basic function tools? thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qspringleaf_1-1622996228420.png" style="width: 640px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33300i4DE1ABDC20B74778/image-dimensions/640x368?v=v2" width="640" height="368" role="button" title="qspringleaf_1-1622996228420.png" alt="qspringleaf_1-1622996228420.png" /&gt;&lt;/span&gt;&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:14:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391034#M64119</guid>
      <dc:creator>qspringleaf</dc:creator>
      <dc:date>2023-06-11T11:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a data table through a graph which is a plot of some data?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391077#M64123</link>
      <description>&lt;P&gt;I think there is a lot of unknown information, so there may not be any great answers.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;is this a smoothed curve?&lt;/LI&gt;&lt;LI&gt;how many data points were there?&lt;/LI&gt;&lt;LI&gt;what resolution did the data have?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Perhaps just using the cross hair tool and a new data table would be good enough for 10 to 20 points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you believe there are 100s of valid points, on the plotted line, you can recover them with a bit of JSL. Read the comments; study the results and make sure they make sense.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//
// this is NOT a general solution; it is tailored for this particular bitmap
//
img = Open( "https://community.jmp.com/t5/image/serverpage/image-id/33300i4DE1ABDC20B74778" );
New Window( "Make sure this is the right image", img ); // view the img
// work with r,g,b arrays of pixel data...
{r, g, b} = img &amp;lt;&amp;lt; getpixels( "rgb" );
// https://community.jmp.com/t5/JSL-Cookbook/Using-Loc-with-a-2D-Matrix/ta-p/195207
// explains the 1D vs 2D matrix/loc stuff...
nr = N Rows( b );
nc = N Cols( b );
// using the MS paint eyedropper, the blue-est of the pixels in the blue line have rgb=(56,89,165)
bluelocs = (Loc( r &amp;lt; (60 / 255) &amp;amp; g &amp;lt; (95 / 255) &amp;amp; b &amp;gt; (160 / 255) ) - 1); // bluelocs is a matrix of 1D indexes (0-based)
blueRowlocs = Floor( (bluelocs) / nc ) + 1; // nc is the number of columns in the 2D pixmat
blueCollocs = Mod( (bluelocs), nc ) + 1; // rowlocs and collocs are 2D indexes (1-based)
// the grid lines have rgb=(215,215,215) (the frame is darker, 165,165,165)
gridlocs = (Loc( r == (215 / 255) &amp;amp; g == (215 / 255) &amp;amp; b == (215 / 255) ) - 1);
gridRowlocs = Floor( (gridlocs) / nc ) + 1; // nc is the number of columns in the 2D pixmat
gridCollocs = Mod( (gridlocs), nc ) + 1; // rowlocs and collocs are 2D indexes (1-based)
// locate the top, bottom, left, and right gray grid lines; their values are hard-coded below...
MINRAD = 5;
MAXRAD = 140;
MINTHK = 595;
MAXTHK = 715;
// CAUTION: this works because there is not a lot of other gray pixels of this shade.
// the while-loop removes a couple that get in the way.
// a different source graph will have different problems.
dtGRAY = As Table( gridRowlocs || gridCollocs, &amp;lt;&amp;lt;columnnames( {"THK", "Radius"} ) );
// sorting, first by thk, makes the first and last gray pixels be for the first and last VERTICAL lines...
dtGRAY &amp;lt;&amp;lt; sort( by( THK ), replacetable );
While( dtGRAY:THK[1] != dtGRAY:THK[2], dtGRAY &amp;lt;&amp;lt; deleterows( 1 ) ); // already OK for this image
RADminPixel = dtGRAY:radius[1];
Write( "\!nradius(min) is x pixel ", RADminPixel );
RADmaxPixel = dtGRAY:radius[N Rows( dtGRAY )];
Write( "\!nradius(max) is x pixel ", RADmaxPixel );
// sorting, by radius, makes the first and last gray pixels be for the first and last HORIZONTAL lines...
dtGRAY &amp;lt;&amp;lt; sort( by( radius ), replacetable );
While( dtGRAY:radius[1] != dtGRAY:radius[2], dtGRAY &amp;lt;&amp;lt; deleterows( 1 ) ); // clears some misc text at the left edge
THKmaxPixel = dtGRAY:THK[1];
Write( "\!nTHK(max) is y pixel ", THKmaxPixel );
THKminPixel = dtGRAY:THK[N Rows( dtGRAY )];
Write( "\!nTHK(min) is y pixel ", THKminPixel );
Close( dtGRAY, nosave );

// scale the data. this is a standard linear interpolation, on the matrix values.
blueRowlocs = (blueRowlocs - THKminPixel) / (THKmaxPixel - THKminPixel) * (MAXTHK - MINTHK) + MINTHK;
blueCollocs = (blueCollocs - RADminPixel) / (RADmaxPixel - RADminPixel) * (MAXRAD - MINRAD) + MINRAD;

// make a table
dtBLUE = As Table( blueRowlocs || blueCollocs, &amp;lt;&amp;lt;columnnames( {"THK", "Radius"} ) );

// and the graph.
dtBLUE &amp;lt;&amp;lt; Graph Builder(
    Size( 1354, 820 ),
    Show Control Panel( 0 ),
    Variables( X( :Radius ), Y( :THK ) ),
    Elements( Points( X, Y, Legend( 4 ) ) ),
    SendToReport(
        Dispatch( {}, "Radius", ScaleBox, {Min( 0 ), Max( 150 ), Inc( 5 ), Minor Ticks( 0 ), Label Row( Show Major Grid( 1 ) )} ),
        Dispatch({},"THK",ScaleBox,{Min(590),Max(720),Inc(5),MinorTicks(1),LabelRow({AutomaticTickMarks(0),ShowMajorGrid(1),ShowMinorTicks(0)})}),
        Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 0 ), Marker Drawing Mode( "Normal" )} )
    )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph of recovered data from blue line" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33306iFBEA4C7C6FCA938B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Graph of recovered data from blue line" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Graph of recovered data from blue line&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works on the original graph you uploaded, not on the reduced resolution graph you most likely see in the discussion.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2021 21:40:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391077#M64123</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-06-06T21:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a data table through a graph which is a plot of some data?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391087#M64125</link>
      <description>&lt;P&gt;Here is a thread with another example of this--&amp;nbsp;&lt;LI-MESSAGE title="Can JSL restore the value of the curve?" uid="382852" url="https://community.jmp.com/t5/Discussions/Can-JSL-restore-the-value-of-the-curve/m-p/382852#U382852" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 17:29:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391087#M64125</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-06-07T17:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a data table through a graph which is a plot of some data?</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391144#M64138</link>
      <description>Hi, so thankful Craige_Hales for this gift, it works well.</description>
      <pubDate>Mon, 07 Jun 2021 08:01:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-generate-a-data-table-through-a-graph-which-is-a-plot-of/m-p/391144#M64138</guid>
      <dc:creator>qspringleaf</dc:creator>
      <dc:date>2021-06-07T08:01:32Z</dc:date>
    </item>
  </channel>
</rss>

