Title: Shape Manipulation Issues with Logarithmic Scale Engine · Issue #37 · PlotPyStack/PlotPy · GitHub
Open Graph Title: Shape Manipulation Issues with Logarithmic Scale Engine · Issue #37 · PlotPyStack/PlotPy
X Title: Shape Manipulation Issues with Logarithmic Scale Engine · Issue #37 · PlotPyStack/PlotPy
Description: When using shapes like AnnotatedRectangle with a logarithmic scale engine on the BasePlot, there are significant problems with shape resizing and movement. While shapes work correctly in linear scale mode, switching to logarithmic scale ...
Open Graph Description: When using shapes like AnnotatedRectangle with a logarithmic scale engine on the BasePlot, there are significant problems with shape resizing and movement. While shapes work correctly in linear sca...
X Description: When using shapes like AnnotatedRectangle with a logarithmic scale engine on the BasePlot, there are significant problems with shape resizing and movement. While shapes work correctly in linear sca...
Opengraph URL: https://github.com/PlotPyStack/PlotPy/issues/37
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Shape Manipulation Issues with Logarithmic Scale Engine","articleBody":"When using shapes like `AnnotatedRectangle` with a logarithmic scale engine on the `BasePlot`, there are significant problems with shape resizing and movement. While shapes work correctly in linear scale mode, switching to logarithmic scale causes erratic behavior:\n- When trying to move the shapes, the entire plot resizes erratically while moving.\n- Shape manipulation doesn't follow mouse movements correctly.\n\nCode sample:\n```\nimport sys\nfrom PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout\nfrom PySide6.QtCore import Qt\nfrom plotpy.plot import BasePlot, PlotManager\nfrom plotpy.tools import SelectTool, AnnotatedRectangleTool\n\nclass Plot(QMainWindow):\n def __init__(self):\n super().__init__()\n self.setWindowTitle(\"Base Plot\")\n self.setGeometry(100, 100, 800, 600)\n\n # Create the main widget and layout\n main_widget = QWidget()\n self.setCentralWidget(main_widget)\n layout = QVBoxLayout(main_widget)\n\n # Create PlotWidget\n self.plot = BasePlot()\n self.plot.set_axis_scale(BasePlot.X_BOTTOM, \"log\", autoscale=False)\n self.plot.set_axis_scale(BasePlot.Y_LEFT, \"log\", autoscale=False)\n\n # self.plot.setMouseTracking(True)\n layout.addWidget(self.plot)\n\n self.manager = PlotManager(self.plot)\n self.manager.add_plot(self.plot)\n\n self.select_tool = self.manager.add_tool(SelectTool)\n self.select_tool.activate()\n self.rect_tool = self.manager.add_tool(AnnotatedRectangleTool, handle_final_shape_cb=self.handle_final_shape, switch_to_default_tool=True)\n\n self.plot.setContextMenuPolicy(Qt.ContextMenuPolicy.ActionsContextMenu)\n self.plot.addAction(\"Add Rectangle\", lambda: self.rect_tool.activate())\n\n def handle_final_shape(self, shape):\n print(f\"Final shape: {shape}\")\n self.plot.unselect_all()\n self.plot.select_item(shape)\n\n def add_shape(self, tool):\n self.manager.get_tool(tool).activate()\n\nif __name__ == '__main__':\n app = QApplication(sys.argv)\n window = Plot()\n window.show()\n sys.exit(app.exec())\n```","author":{"url":"https://github.com/imad-miftek","@type":"Person","name":"imad-miftek"},"datePublished":"2025-03-19T02:45:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/37/PlotPy/issues/37"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:319dbdd1-bb21-4340-7838-55b7dc9d34e7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABC4:292C2E:117643B:17FE254:69737A5C |
| html-safe-nonce | 5df71da58b14e0a9570f0ed3547742ba4444aac7aa4d80773d1a91211edf4225 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkM0OjI5MkMyRToxMTc2NDNCOjE3RkUyNTQ6Njk3MzdBNUMiLCJ2aXNpdG9yX2lkIjoiNjkxMDU1MDEyNzIwMzc2NDEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c08e9abdad0c38cca2f8c6eeb5671f3761d6073cbd4187879ada7c44e833efb6 |
| hovercard-subject-tag | issue:2930298439 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PlotPyStack/PlotPy/37/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06680d38d35d76565b69d70404df6a38ff2bb06488578d5118963fec24b77e58/PlotPyStack/PlotPy/issues/37 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06680d38d35d76565b69d70404df6a38ff2bb06488578d5118963fec24b77e58/PlotPyStack/PlotPy/issues/37 |
| og:image:alt | When using shapes like AnnotatedRectangle with a logarithmic scale engine on the BasePlot, there are significant problems with shape resizing and movement. While shapes work correctly in linear sca... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | imad-miftek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 428a21a49f122b628f8a394395c46467f72234e6951b5ad2aa38a148e3ad0b82 |
| turbo-cache-control | no-preview |
| go-import | github.com/PlotPyStack/PlotPy git https://github.com/PlotPyStack/PlotPy.git |
| octolytics-dimension-user_id | 145201262 |
| octolytics-dimension-user_login | PlotPyStack |
| octolytics-dimension-repository_id | 671159499 |
| octolytics-dimension-repository_nwo | PlotPyStack/PlotPy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 671159499 |
| octolytics-dimension-repository_network_root_nwo | PlotPyStack/PlotPy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 62772170c67d278e8fe7d919d317510b97ca695c |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width