<?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: Draw Polygon on chart and get coordinates question in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Draw-Polygon-on-chart-and-get-coordinates-question/m-p/209726#M42045</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5537"&gt;@djhanson&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The graphic created by Add Polygon Annotation seems to be added to the PictureBox object and the values in the save script are units of pixels. An approximation of the X and Y coordinates can possibly be made by:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;getting the pixels of the polygon&lt;/LI&gt;
&lt;LI&gt;getting the size of the PictureBox&lt;/LI&gt;
&lt;LI&gt;getting the size of each AxisBox, and maybe the FrameBox&lt;/LI&gt;
&lt;LI&gt;getting each axis's settings (Min, Max, Inc)&lt;/LI&gt;
&lt;LI&gt;compute the relative values.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That said, once I calculated that, I would remove the Polygon Annotation and add a graphics script&amp;nbsp;to the FrameBox that draws a polygon using the approximated coordinates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other methods would be to add a button to the report that draws an editable polygon. This would require callback functions using a MouseBox or Handle or something like that. There are other call back methods that I can imagine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have time at the moment to take a stab at either method. But maybe another community member has a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be useful to know how you intend to use these coodinates.&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2019 16:28:30 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2019-05-21T16:28:30Z</dc:date>
    <item>
      <title>Draw Polygon on chart and get coordinates question</title>
      <link>https://community.jmp.com/t5/Discussions/Draw-Polygon-on-chart-and-get-coordinates-question/m-p/209505#M42012</link>
      <description>&lt;P&gt;I have a bivariate chart with x/y coordinates.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can draw a polygon (which I think is Add Polygon Annotation) and then script the chart to find out the polygon's coordinates.&amp;nbsp; Problem is: they are not the coordinates of the chart's x/y axis.&amp;nbsp; Rather they seem to be coordinates of its polygon coordinate system, maybe like pixels or something like this.&lt;BR /&gt;&lt;BR /&gt;Question: is there anyway to draw/freehand a polygon over a chart and get the polygon's coordinates in terms of those of the chart's x/y coordinate system?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks, DJ&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 20:02:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Draw-Polygon-on-chart-and-get-coordinates-question/m-p/209505#M42012</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2019-05-20T20:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Draw Polygon on chart and get coordinates question</title>
      <link>https://community.jmp.com/t5/Discussions/Draw-Polygon-on-chart-and-get-coordinates-question/m-p/209726#M42045</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5537"&gt;@djhanson&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The graphic created by Add Polygon Annotation seems to be added to the PictureBox object and the values in the save script are units of pixels. An approximation of the X and Y coordinates can possibly be made by:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;getting the pixels of the polygon&lt;/LI&gt;
&lt;LI&gt;getting the size of the PictureBox&lt;/LI&gt;
&lt;LI&gt;getting the size of each AxisBox, and maybe the FrameBox&lt;/LI&gt;
&lt;LI&gt;getting each axis's settings (Min, Max, Inc)&lt;/LI&gt;
&lt;LI&gt;compute the relative values.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That said, once I calculated that, I would remove the Polygon Annotation and add a graphics script&amp;nbsp;to the FrameBox that draws a polygon using the approximated coordinates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other methods would be to add a button to the report that draws an editable polygon. This would require callback functions using a MouseBox or Handle or something like that. There are other call back methods that I can imagine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have time at the moment to take a stab at either method. But maybe another community member has a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be useful to know how you intend to use these coodinates.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 16:28:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Draw-Polygon-on-chart-and-get-coordinates-question/m-p/209726#M42045</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-05-21T16:28:30Z</dc:date>
    </item>
  </channel>
</rss>

