Skip to content

SelectPolygon: preserve first-pixel marker size in pixels on zoom#4645

Open
woutdenolf wants to merge 4 commits into
mainfrom
117-plot-polygon-interaction-first-point-might-not-be-well-displayed
Open

SelectPolygon: preserve first-pixel marker size in pixels on zoom#4645
woutdenolf wants to merge 4 commits into
mainfrom
117-plot-polygon-interaction-first-point-might-not-be-well-displayed

Conversation

@woutdenolf

@woutdenolf woutdenolf commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

PR summary

Marker of the first point in a polygon stays the same size on zooming. Closing the polygon is done when clicking on the marker.

Peek 2026-06-19 17-01
import sys

from silx.gui import qt
from silx.gui.plot import Plot1D

app = qt.QApplication(sys.argv)

plot = Plot1D()

plot.addCurve([0, 100], [0, 100], legend="diag")

plot.setLimits(0, 100, 0, 100)
plot.show()

plot.setInteractiveMode("draw", shape="polygon")

sys.exit(app.exec())

AI Disclosure

  • No AI used
  • AI tool(s) ... used for ...

@woutdenolf woutdenolf marked this pull request as ready for review June 19, 2026 15:03
@woutdenolf woutdenolf requested a review from a team June 19, 2026 15:04
@payno

payno commented Jun 22, 2026

Copy link
Copy Markdown
Member

From what I saw only the polygon ROI needs a marker to 'close the loop' right ?

@payno payno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍
Fine with it except if the square marker is used for other ROI but It doesn't looks so.

Comment thread src/silx/gui/plot/PlotInteraction.py Outdated
Comment thread src/silx/gui/plot/PlotInteraction.py Outdated
Comment thread src/silx/gui/plot/PlotInteraction.py Outdated
@payno

payno commented Jun 22, 2026

Copy link
Copy Markdown
Member

I saw a typo on the (already existing) doc. I allowed myself to fix it and embed it with this PR (e0c3d5b)

@woutdenolf woutdenolf force-pushed the 117-plot-polygon-interaction-first-point-might-not-be-well-displayed branch from 5d7a8ac to 720bce6 Compare June 22, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Plot] Polygon interaction first point might not be well displayed

2 participants