* changed structure to redefine axis via
plotitem.setAxes
* cleanuup
* remove old axesitems before adding new ones
* DEBUGGED plotitem.setAxes
NEW AxisItem.setOrientation (needed by plotitem.setAxes)
show/hide right axes after .setAxes()
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
* Fix duplicate menus in GradientEditorItem
Add call to ev.accept in Tivk.mouseClickEvent to prevent parent menu from opening on a right click of a Tick.
Co-authored-by: Ogi <ognyan.moore@gmail.com>
Add a check in the viewTransformChanged function to only force a rerender when the downsampling factor changed.
Previously simply moving the image around or zooming in/out without changing the downsampling factor would force a complete rerendering of the image, which was very slow with large images. This way, the expensive rerender is only forced if necessary.
* Check and enforce view limits in the setRange function
* Check limits when setting aspectRatio
- This change is required due to moving the limit checking out of the updateViewRange function.
- If the original logic remained, aspect ratio could be lost due to "squshing" the requested view into the viewBox
* Add tests for ViewBox zooming limits and aspect ratio
* - Move test code to proper location and fix instantiation of QApplication
Co-authored-by: Israel Brewster <ijbrewster@alaska.edu>
* Fix: Parameter tree ignores user-set 'expanded' state
When setting the 'expanded' state of parameters, this change is not applied
in the graphically visible tree. This commit changes that behaviour by
adding a clause in `ParameterItem.optsChanged` to react to that.
Fixes#1130
* ParameterTree: Add option to synchronize "expanded" state
As seen in #1130, there is interest in synchronizing the "expanded" state
of `Parameter`s in `ParameterTree`s. As a default, this would lead to
users being forced to always have multiple `ParameterTree`s to be
expanded in the exact same way. Since that might not be desirable, this
commit adds an option to customize whether synchronization
of the "expanded" state should happen.
* Fix: Sync Parameter options "renamable" and "removable" with ParameterTrees
Currently, `Parameter` options `renamable` and `removable` are only considered
when building a new `ParameterTree`. This commit makes changes in those
options reflected in the corresponding `ParameterItem`s.
* ParameterTree: Reflect changes in Parameter option 'tip'
* Parameter: When setting "syncExpanded", update "expanded" state directly
Co-authored-by: 2xB <2xB@users.noreply.github.com>
Always pass `sys.argv`, if non-empty, to `QApplication` constructor.
This allows code to continue to rely on the fact that the application
name is by default set from `sys.argv[0]`, which is important for
example on Linux where this determines the WM_CLASS X attribute used by
desktop environments to match applications to their launchers.
If `sys.argv` is empty, as it is in an interactive Python session, pass
`["pyqtgraph"]` in its place as a sensible default for the application
name, which causes issues if not set (issue #1165).
If a `name` is given, set it using `setApplicationName()` instead of via
the argument list. This ensures it will be set even if the singleton
`QApplication` already existed prior to calling `mkQApp()`.
* Added test_AxisItem by @mliberty1
As found in https://github.com/pyqtgraph/pyqtgraph/pull/917
* test_AxisItem: Fit to current implementation
* DateAxisItem: Fix documentation to zoomLevels
zoomLevels is not intended to be set by the user (see discussion in converstation from
https://github.com/pyqtgraph/pyqtgraph/pull/1154/files#diff-aefdb23660d0963df0dff3a116baded8
). Also, `zoomLevelWidths` does currently not exist.
This commit adapts the documentation to reflect that.
* DateAxisItem: Do not publish ZoomLevel
* DateAxisItem testing: Removed unnecessary monkeypatch fixture
Co-authored-by: 2xB <2xB@users.noreply.github.com>