cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-209505%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9C%A8%E5%9B%BE%E8%A1%A8%E4%B8%8A%E7%BB%98%E5%88%B6%E5%A4%9A%E8%BE%B9%E5%BD%A2%E5%B9%B6%E8%8E%B7%E5%8F%96%E5%9D%90%E6%A0%87%E9%97%AE%E9%A2%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209505%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E6%9C%89%E4%B8%80%E4%B8%AA%E5%B8%A6%E6%9C%89%20x%2Fy%20%E5%9D%90%E6%A0%87%E7%9A%84%E4%BA%8C%E5%85%83%E5%9B%BE%E8%A1%A8%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%88%91%E5%8F%AF%E4%BB%A5%E7%BB%98%E5%88%B6%E4%B8%80%E4%B8%AA%E5%A4%9A%E8%BE%B9%E5%BD%A2%EF%BC%88%E6%88%91%E8%AE%A4%E4%B8%BA%E6%98%AF%E6%B7%BB%E5%8A%A0%E5%A4%9A%E8%BE%B9%E5%BD%A2%E6%B3%A8%E9%87%8A%EF%BC%89%EF%BC%8C%E7%84%B6%E5%90%8E%E7%BC%96%E5%86%99%E5%9B%BE%E8%A1%A8%E8%84%9A%E6%9C%AC%E6%9D%A5%E6%89%BE%E5%87%BA%E5%A4%9A%E8%BE%B9%E5%BD%A2%E7%9A%84%E5%9D%90%E6%A0%87%E3%80%82%E9%97%AE%E9%A2%98%E6%98%AF%EF%BC%9A%E5%AE%83%E4%BB%AC%E4%B8%8D%E6%98%AF%E5%9B%BE%E8%A1%A8%20x%2Fy%20%E8%BD%B4%E7%9A%84%E5%9D%90%E6%A0%87%E3%80%82%E7%9B%B8%E5%8F%8D%EF%BC%8C%E5%AE%83%E4%BB%AC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E6%9C%89%E5%85%B6%E4%BB%96%E5%9B%9E%E8%B0%83%E6%96%B9%E6%B3%95%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E6%88%91%E7%8E%B0%E5%9C%A8%E6%B2%A1%E6%9C%89%E6%97%B6%E9%97%B4%E5%B0%9D%E8%AF%95%E8%BF%99%E4%B8%A4%E7%A7%8D%E6%96%B9%E6%B3%95%E3%80%82%20%E4%BD%86%E4%B9%9F%E8%AE%B8%E5%8F%A6%E4%B8%80%E4%B8%AA%E7%A4%BE%E5%8C%BA%E6%88%90%E5%91%98%E6%9C%89%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E4%BA%86%E8%A7%A3%E6%82%A8%E6%89%93%E7%AE%97%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E8%BF%99%E4%BA%9B%E5%9D%90%E6%A0%87%E5%B0%86%E4%BC%9A%E5%BE%88%E6%9C%89%E7%94%A8%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
djhanson
Level V

Draw Polygon on chart and get coordinates question

I have a bivariate chart with x/y coordinates. 

I can draw a polygon (which I think is Add Polygon Annotation) and then script the chart to find out the polygon's coordinates.  Problem is: they are not the coordinates of the chart's x/y axis.  Rather they seem to be coordinates of its polygon coordinate system, maybe like pixels or something like this.

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?

 

thanks, DJ

1 REPLY 1
gzmorgan0
Super User (Alumni)

Re: Draw Polygon on chart and get coordinates question

@djhanson,

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:

  • getting the pixels of the polygon
  • getting the size of the PictureBox
  • getting the size of each AxisBox, and maybe the FrameBox
  • getting each axis's settings (Min, Max, Inc)
  • compute the relative values.

That said, once I calculated that, I would remove the Polygon Annotation and add a graphics script to the FrameBox that draws a polygon using the approximated coordinates. 

 

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.

 

I don't have time at the moment to take a stab at either method. But maybe another community member has a solution.

 

It would be useful to know how you intend to use these coodinates.

Recommended Articles