cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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%3EZeichnen%20Sie%20ein%20Polygon%20in%20die%20Karte%20und%20erhalten%20Sie%20eine%20Koordinatenfrage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209505%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIch%20habe%20ein%20bivariates%20Diagramm%20mit%20x%2Fy-Koordinaten.%3CBR%20%2F%3E%3CBR%20%2F%3EIch%20kann%20ein%20Polygon%20zeichnen%20(was%20meiner%20Meinung%20nach%20%E2%80%9EPolygonanmerkung%20hinzuf%C3%BCgen%E2%80%9C%20ist)%20und%20dann%20das%20Diagramm%20per%20Skript%20erstellen%2C%20um%20die%20Koordinaten%20des%20Polygons%20herauszufinden.Das%20Problem%20ist%3A%20Es%20handelt%20sich%20nicht%20um%20die%20Koordinaten%20der%20x%2Fy-Achse%20des%20Diagramms.Vielmehr%20scheinen%20sie%20Koordinaten%20des%20Polygonkoordinatensystems%20zu%20sein%2C%20vielleicht%20wie%20Pixel%20oder%20so%20etwas%20in%20der%20Art.%3CBR%20%2F%3E%3CBR%20%2F%3E%20Frage%3A%20Gibt%20es%20%C3%BCberhaupt%20eine%20M%C3%B6glichkeit%2C%20ein%20Polygon%20freih%C3%A4ndig%20%C3%BCber%20ein%20Diagramm%20zu%20zeichnen%20und%20die%20Koordinaten%20des%20Polygons%20anhand%20der%20Koordinaten%20des%20x%2Fy-Koordinatensystems%20des%20Diagramms%20zu%20ermitteln%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDanke%2C%20DJ%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-209726%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Polygon%20auf%20Diagramm%20zeichnen%20und%20Frage%20zu%20Koordinaten%20erhalten%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-209726%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5537%22%20target%3D%22_blank%22%3E%40djhanson%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3EDie%20durch%20%E2%80%9EAdd%20Polygon%20Annotation%E2%80%9C%20erstellte%20Grafik%20scheint%20zum%20PictureBox-Objekt%20hinzugef%C3%BCgt%20worden%20zu%20sein%20und%20die%20Werte%20im%20Speicherskript%20sind%20Pixeleinheiten.%20Eine%20N%C3%A4herung%20der%20X-%20und%20Y-Koordinaten%20kann%20m%C3%B6glicherweise%20erfolgen%20durch%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EErmitteln%20der%20Pixel%20des%20Polygons%3C%2FLI%3E%0A%3CLI%3EErmitteln%20der%20Gr%C3%B6%C3%9Fe%20der%20PictureBox%3C%2FLI%3E%0A%3CLI%3EErmitteln%20der%20Gr%C3%B6%C3%9Fe%20jeder%20AxisBox%20und%20m%C3%B6glicherweise%20der%20FrameBox%3C%2FLI%3E%0A%3CLI%3EAbrufen%20der%20Einstellungen%20jeder%20Achse%20(Min%2C%20Max%2C%20Inc)%3C%2FLI%3E%0A%3CLI%3EBerechnen%20Sie%20die%20relativen%20Werte.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESobald%20ich%20das%20berechnet%20habe%2C%20w%C3%BCrde%20ich%20jedoch%20die%20Polygon-Annotation%20entfernen%20und%20der%20FrameBox%20ein%20Grafikskript%20hinzuf%C3%BCgen%2C%20das%20ein%20Polygon%20anhand%20der%20angen%C3%A4herten%20Koordinaten%20zeichnet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAndere%20Methoden%20w%C3%A4ren%20das%20Hinzuf%C3%BCgen%20einer%20Schaltfl%C3%A4che%20zum%20Bericht%2C%20die%20ein%20bearbeitbares%20Polygon%20zeichnet.%20Dies%20w%C3%BCrde%20R%C3%BCckruffunktionen%20erfordern%2C%20die%20eine%20MouseBox%20oder%20ein%20Handle%20oder%20%C3%A4hnliches%20verwenden.%20Es%20gibt%20andere%20R%C3%BCckrufmethoden%2C%20die%20ich%20mir%20vorstellen%20kann.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIch%20habe%20im%20Moment%20keine%20Zeit%2C%20eine%20der%20beiden%20Methoden%20auszuprobieren.%20Aber%20vielleicht%20hat%20ein%20anderes%20Community-Mitglied%20eine%20L%C3%B6sung.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEs%20w%C3%A4re%20hilfreich%20zu%20wissen%2C%20wie%20Sie%20diese%20Koordinaten%20verwenden%20m%C3%B6chten.%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