Changing Scales and Axes#

This example demonstrates how to modify the scales and axes of a plot. These are rendered as QLabels but can be edited by left-clicking on them which will change them into QLineEdits for text input.


editing axes
CPU Count: 3
[startup] Plot update worker thread start completed in 0.0 ms
[startup] Plot control dock creation completed in 15.0 ms
[startup] Inst. control dock creation completed in 16.8 ms
Starting Dask LocalCluster with 1 workers, and 1 threads per worker
Creating Data
Dialog accepted
Data created
Creating Signal Tree for signal
Dask cluster ready. Dashboard: http://127.0.0.1:8787/status
Initializing navigator for root signal:  <LazySignal2D, title: , dimensions: (10|256, 256)>
Navigator initialized:  [<LazySignal1D, title: , dimensions: (|10)>]
resolved icons /Users/runner/work/spyde/spyde/spyde/qt/assets/icons/minimize.svg
False
{<spyde.drawing.plots.plot.Plot(0x1697c79a0, parent=0x1697c51c0, pos=12,12, flags=(ItemUsesExtendedStyleOption|ItemSendsGeometryChanges)) at 0x16aba1700>: [(0, 0)]}  after adding item at ( 0 , 0 )
Adding navigation plot states for signals: [<LazySignal1D, title: , dimensions: (|10)>]
{<spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>: {}}
Adding navigation plot state for plot: <spyde.drawing.plots.plot.Plot(0x1697c79a0, parent=0x1697c51c0, pos=12,12, flags=(ItemUsesExtendedStyleOption|ItemSendsGeometryChanges)) at 0x16aba1700>
Plot states {}
SubTB: [[]]
SubTB: [[], []]
SubTB: [[], [], []]
SubTB: [[], [], [], []]
SubTB: [[], [], [], [], []]
Adding toolbar action: Reset to right toolbar
Function: functools.partial(<function reset_view at 0x147d363e0>, action_name='Reset'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/fullsize.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom In to right toolbar
Function: functools.partial(<function zoom_in at 0x147d34ea0>, action_name='Zoom In'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoom.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom Out to right toolbar
Function: functools.partial(<function zoom_out at 0x147d36340>, action_name='Zoom Out'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoomout.svg, Toggle: False, Params: {}
Adding toolbar action: Add Selector to right toolbar
Function: functools.partial(<function add_selector at 0x147d371a0>, action_name='Add Selector'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/add_selector.svg, Toggle: False, Params: {}
Adding toolbar action: Select Navigator to right toolbar
Function: functools.partial(<function toggle_navigation_plots at 0x147d372e0>, action_name='Select Navigator'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/navigator.svg, Toggle: True, Params: {}
Initialized PlotState: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>
setting Plot states:  {<LazySignal1D, title: , dimensions: (|10)>: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>}  to signal: <LazySignal1D, title: , dimensions: (|10)>
updating data for static plot state... [<Future: pending, key: finalize-hlgfinalizecompute-5e7ed98f27f743b3872d1c4ab8e52ece>]
Updating plot data [<Future: pending, key: finalize-hlgfinalizecompute-5e7ed98f27f743b3872d1c4ab8e52ece>]  force= False
Updating 1D plot with axis: [0. 1. 2. 3. 4. 5. 6. 7. 8. 9.]
Data shape: [1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
The view range: [[0, 1], [0, 1]]
Setting current data to: <Future: pending, key: finalize-hlgfinalizecompute-5e7ed98f27f743b3872d1c4ab8e52ece>
Plot data updated.
Showing selectors for plot_window: <spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>
Current visible selectors: []
visible selectors: []
Updating axes widget, plot state: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>
Getting metadata widget
Processing subsection: Instrument Metadata
Processing property: Mag with value: {'key': 'Acquisition_instrument.TEM.magnification', 'type': 'float', 'description': 'The magnification factor of the instrument.', 'default': '--', 'units': 'x'}
Resolved value for Mag: -- x
Processing property: Acc. Volt. with value: {'key': 'Acquisition_instrument.TEM.beam_energy', 'type': 'float', 'description': 'The acceleration voltage used during imaging.', 'default': '--', 'units': 'kV'}
Resolved value for Acc. Volt.: -- kV
Processing property: Cam. Len. with value: {'key': 'Acquisition_instrument.TEM.camera_length', 'type': 'float', 'description': 'The camera length setting of the instrument.', 'default': '--', 'units': 'mm'}
Resolved value for Cam. Len.: -- mm
Processing property: Conv. Angle with value: {'key': 'Acquisition_instrument.TEM.convergence_angle', 'type': 'float', 'description': 'The convergence angle of the electron beam.', 'default': '--', 'units': 'mrad'}
Resolved value for Conv. Angle: -- mrad
Processing subsection: Root Experiment Details
Processing property: Name with value: {'key': 'General.title', 'type': 'string', 'description': 'Name of the experiment.', 'default': '--'}
Resolved value for Name:
Processing property: Date with value: {'key': 'General.date', 'type': 'string', 'description': 'Date when the experiment was conducted.', 'default': 'YYYY-MM-DD'}
Resolved value for Date: YYYY-MM-DD
Processing property: e-/s with value: {'type': 'float', 'key': 'Acquisition_instrument.TEM.electrons_per_second', 'description': 'Electrons per second.', 'default': '--', 'units': 'e/s'}
Resolved value for e-/s: -- e/s
Processing property: Dtype with value: {'type': 'string', 'attr': 'root.data.dtype.name', 'description': 'Type of data collected.', 'default': '--'}
Resolved value for Dtype: int8
Processing property: Dim. with value: {'type': 'string', 'function': 'root.axes_manager._get_dimension_str()', 'description': 'Dimensions of the collected data.', 'default': '--'}
Calling function for property Dim.: root.axes_manager._get_dimension_str()
Function root.axes_manager._get_dimension_str() not found.
Resolved value for Dim.: --
Processing property: Mode with value: {'type': 'string', 'key': 'Acquisition_instrument.Detector.exposure_mode', 'description': 'Integrating or counting mode.', 'default': '--'}
Resolved value for Mode: --
Processing property: Cam. with value: {'type': 'string', 'key': 'Acquisition_instrument.Detector.camera_model', 'description': 'The camera model used for data acquisition.', 'default': '--'}
Resolved value for Cam.: --
Final Subsections: {'Instrument Metadata': {'Mag': '-- x', 'Acc. Volt.': '-- kV', 'Cam. Len.': '-- mm', 'Conv. Angle': '-- mrad'}, 'Root Experiment Details': {'Name': '', 'Date': 'YYYY-MM-DD', 'e-/s': '-- e/s', 'Dtype': 'int8', 'Dim.': '--', 'Mode': '--', 'Cam.': '--'}}
Parent selector None
Delayed updating data for plot state: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>
<pyqtgraph.graphicsItems.ImageItem.ImageItem(0x1697d5010, pos=0,0, flags=(ItemSendsGeometryChanges)) at 0x169987700>
Showing toolbars for plot state: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>
Adding navigation selector to plot window: <spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>  with dim: 1
Plot window level: 1  children dict: {}
{<spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>: {}}
1
resolved icons /Users/runner/work/spyde/spyde/spyde/qt/assets/icons/minimize.svg
False
{<spyde.drawing.plots.plot.Plot(0x16ad3abf0, parent=0x16ad395c0, pos=12,12, flags=(ItemUsesExtendedStyleOption|ItemSendsGeometryChanges)) at 0x16ab7b140>: [(0, 0)]}  after adding item at ( 0 , 0 )
Hiding [<pyqtgraph.graphicsItems.LinearRegionItem.LinearRegionItem(0x158ee4e90, parent=0x1697d5fe0, pos=0,0, flags=(ItemSendsGeometryChanges)) at 0x16ac34b40>]
Plot states {}
SubTB: [[]]
SubTB: [[], []]
SubTB: [[], [], []]
SubTB: [[], [], [], []]
SubTB: [[], [], [], [], []]
SubTB: [[], [], [], [], [], []]
SubTB: [[], [], [], [], [], [], []]
add_virtual_image
{'add_virtual_image': {'name': 'Add Virtual Image', 'description': 'Adds a virtual image from the 4D-STEM data.', 'icon': 'drawing/toolbars/icons/zoom.svg', 'function': 'spyde.actions.pyxem.add_virtual_image'}}
Sub Entries [(functools.partial(<function add_virtual_image at 0x159258e00>, action_name='add_virtual_image'), '/Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoom.svg', 'Add Virtual Image', False, {})]
SubTB: [[], [], [], [], [], [], [], [(functools.partial(<function add_virtual_image at 0x159258e00>, action_name='add_virtual_image'), '/Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoom.svg', 'Add Virtual Image', False, {})]]
Adding toolbar action: Reset to right toolbar
Function: functools.partial(<function reset_view at 0x147d363e0>, action_name='Reset'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/fullsize.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom In to right toolbar
Function: functools.partial(<function zoom_in at 0x147d34ea0>, action_name='Zoom In'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoom.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom Out to right toolbar
Function: functools.partial(<function zoom_out at 0x147d36340>, action_name='Zoom Out'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoomout.svg, Toggle: False, Params: {}
Adding toolbar action: FFT to right toolbar
Function: functools.partial(<function add_fft_selector at 0x147d37240>, action_name='FFT'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/fft.svg, Toggle: False, Params: {}
Adding toolbar action: Navigate Signal Tree to right toolbar
Function: functools.partial(<function toggle_signal_tree at 0x147d377e0>, action_name='Navigate Signal Tree'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/signal_tree.svg, Toggle: True, Params: {}
Adding toolbar action: Rebin to bottom toolbar
Function: functools.partial(<function rebin2d at 0x147d37740>, action_name='Rebin'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/rebin.svg, Toggle: True, Params: {'scale_x': {'name': 'Scale X', 'type': 'int', 'default': 2}, 'scale_y': {'name': 'Scale Y', 'type': 'int', 'default': 2}}
Setting CaretGroup side opposite to toolbar position: bottom
Creating CaretParams with parameters: {'scale_x': {'name': 'Scale X', 'type': 'int', 'default': 2}, 'scale_y': {'name': 'Scale Y', 'type': 'int', 'default': 2}}
Adding toolbar action: Center Zero Beam to bottom toolbar
Function: functools.partial(<function center_zero_beam at 0x159259120>, action_name='Center Zero Beam'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/center_zero_beam.svg, Toggle: True, Params: {'method': {'name': 'Method', 'type': 'enum', 'default': 'blur', 'options': ['cross_correlate', 'center_of_mass', 'blur', 'interpolate']}, 'sigma': {'name': 'Sigma', 'type': 'float', 'default': 2.0, 'display_condition': {'parameter': 'method', 'value': 'blur'}}, 'min_cc_disk_radius': {'name': 'Min CC Disk Radius', 'type': 'int', 'default': 5, 'display_condition': {'parameter': 'method', 'value': 'cross_correlate'}}, 'max_cc_disk_radius': {'name': 'Max CC Disk Radius', 'type': 'int', 'default': 15, 'display_condition': {'parameter': 'method', 'value': 'cross_correlate'}}, 'signal_slice': {'name': 'Signal Slice', 'type': 'RectangleSelector', 'position': 'centered', 'size': 0.2}, 'make_flat_field': {'name': 'Make Flat Field', 'type': 'bool', 'default': False}}
Setting CaretGroup side opposite to toolbar position: bottom
Creating CaretParams with parameters: {'method': {'name': 'Method', 'type': 'enum', 'default': 'blur', 'options': ['cross_correlate', 'center_of_mass', 'blur', 'interpolate']}, 'sigma': {'name': 'Sigma', 'type': 'float', 'default': 2.0, 'display_condition': {'parameter': 'method', 'value': 'blur'}}, 'min_cc_disk_radius': {'name': 'Min CC Disk Radius', 'type': 'int', 'default': 5, 'display_condition': {'parameter': 'method', 'value': 'cross_correlate'}}, 'max_cc_disk_radius': {'name': 'Max CC Disk Radius', 'type': 'int', 'default': 15, 'display_condition': {'parameter': 'method', 'value': 'cross_correlate'}}, 'signal_slice': {'name': 'Signal Slice', 'type': 'RectangleSelector', 'position': 'centered', 'size': 0.2}, 'make_flat_field': {'name': 'Make Flat Field', 'type': 'bool', 'default': False}}
Adding RectangleSelector ROI for parameter: signal_slice
Toolbar available: True
toolbar.plot available: True
Current signal extent: (0.0, 255.0, 0.0, 255.0)
Computed signal center: (127.5, 127.5)
Computed signal width: 255.0
Computed ROI size: 51.0 51.0
Computed ROI position: PySide6.QtCore.QPointF(102.000000, 102.000000)
Adding RectangleSelector ROI to plot.
Adding toolbar action: Virtual Imaging to bottom toolbar
Function: functools.partial(<function virtual_imaging at 0x159259260>, action_name='Virtual Imaging'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/virtual_image_color.svg, Toggle: True, Params: {}
Restoring plot items for action: Center Zero Beam
Initialized PlotState: <PlotState signal=<LazySignal2D, title: , dimensions: (10|256, 256)>, dimensions=2, dynamic=True>
setting Plot states:  {<LazySignal2D, title: , dimensions: (10|256, 256)>: <PlotState signal=<LazySignal2D, title: , dimensions: (10|256, 256)>, dimensions=2, dynamic=True>}  to signal: <LazySignal2D, title: , dimensions: (10|256, 256)>
All Items: [<pyqtgraph.graphicsItems.ImageItem.ImageItem(0x158ed9ba0, parent=0x16ad3e750, pos=0,0, flags=(ItemSendsGeometryChanges)) at 0x16ac0f400>]
Multi Selector
Upstream Indices:  []
Combined Indices: [[0]]
Updating child plot based on navigation selection with indices: [[0]]
Current signal shape (10, 256, 256)
Cache in shared memory: True
Updating plot data <Future: pending, key: write_shared_array-f204178d7b0ac35b50a897a315267086>  force= False
Setting image data with img [[0. 1. 0. ... 1. 0. 1.]
 [1. 1. 1. ... 1. 1. 1.]
 [0. 1. 0. ... 1. 0. 1.]
 ...
 [1. 1. 1. ... 1. 1. 1.]
 [0. 1. 0. ... 1. 0. 1.]
 [1. 1. 1. ... 1. 1. 1.]]
setImage took 0.17ms
The view range: [[-0.5404624277456649, 0.5404624277456649], [-0.5000000000000001, 0.5000000000000001]]
Setting current data to: <Future: pending, key: write_shared_array-f204178d7b0ac35b50a897a315267086>
Plot data updated.
updating data for dynamic plot state... <Future: pending, key: write_shared_array-f204178d7b0ac35b50a897a315267086>
Updating plot data <Future: pending, key: write_shared_array-f204178d7b0ac35b50a897a315267086>  force= False
Setting current data to: <Future: pending, key: write_shared_array-f204178d7b0ac35b50a897a315267086>
Plot data updated.
Updating selectors for new image transform: []
50.0 <undefined>
50.0 &lt;undefined&gt;
Showing selectors for plot_window: <spyde.drawing.plots.plot_window.PlotWindow(0x16ad2f2b0) at 0x1699f6800>
Current visible selectors: []
No navigation selectors for this plot window.
visible selectors: []
Updating axes widget, plot state: <PlotState signal=<LazySignal2D, title: , dimensions: (10|256, 256)>, dimensions=2, dynamic=True>
Removing selector control widgets for plot_window: <spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>
Nav sel {<spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>: [<spyde.drawing.selectors.selector1d.IntegratingSelector1D object at 0x16abd7010>]}
Plot win <spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>
Parent selector <spyde.drawing.selectors.selector1d.LinearRegionSelector object at 0x1699e0310>
Delayed updating data for plot state: <PlotState signal=<LazySignal2D, title: , dimensions: (10|256, 256)>, dimensions=2, dynamic=True>
Multi Selector
Upstream Indices:  []
Combined Indices: [[0]]
Updating child plot based on navigation selection with indices: [[0]]
Current signal shape (10, 256, 256)
Cache in shared memory: True
Updating plot data <Future: pending, key: write_shared_array-d0f61943b2b392aca180919eb75f7e13>  force= False
Setting current data to: <Future: pending, key: write_shared_array-d0f61943b2b392aca180919eb75f7e13>
Plot data updated.
<pyqtgraph.graphicsItems.ImageItem.ImageItem(0x158ed9ba0, parent=0x16ad3e750, pos=0,0, flags=(ItemSendsGeometryChanges)) at 0x16ac0f400>
Showing toolbars for plot state: <PlotState signal=<LazySignal2D, title: , dimensions: (10|256, 256)>, dimensions=2, dynamic=True>
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py:615: UserWarning: Item already added to PlotItem, ignoring.
  warnings.warn('Item already added to PlotItem, ignoring.')
Updating Data
Multi Selector
Upstream Indices:  []
Combined Indices: [[0]]
Not integrating, taking mean of indices
Updating child plot based on navigation selection with indices: [0]
Current signal shape (10, 256, 256)
Cache in shared memory: True
Updating plot data <Future: pending, key: write_shared_array-f2da68ad0e04bb3a0fed25b893128bf8>  force= False
Setting current data to: <Future: pending, key: write_shared_array-f2da68ad0e04bb3a0fed25b893128bf8>
Plot data updated.
Updating plot data <Future: pending, key: write_shared_array-f2da68ad0e04bb3a0fed25b893128bf8>  force= False
Setting current data to: <Future: pending, key: write_shared_array-f2da68ad0e04bb3a0fed25b893128bf8>
Plot data updated.
Created Signal Tree with root signal:  <LazySignal2D, title: , dimensions: (10|256, 256)>
Signal Tree Created
Adding navigator signal: Temperature
Adding navigation plot states for signals: [<Signal1D, title: Temperature, dimensions: (|10)>]
{<spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>: {<spyde.drawing.plots.plot_window.PlotWindow(0x16ad2f2b0) at 0x1699f6800>: {}}}
Adding navigation plot state for plot: <spyde.drawing.plots.plot.Plot(0x1697c79a0, parent=0x1697c51c0, pos=12,12, flags=(ItemUsesExtendedStyleOption|ItemSendsGeometryChanges)) at 0x16aba1700>
Plot states {<LazySignal1D, title: , dimensions: (|10)>: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>}
SubTB: [[]]
SubTB: [[], []]
SubTB: [[], [], []]
SubTB: [[], [], [], []]
SubTB: [[], [], [], [], []]
Adding toolbar action: Reset to right toolbar
Function: functools.partial(<function reset_view at 0x147d363e0>, action_name='Reset'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/fullsize.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom In to right toolbar
Function: functools.partial(<function zoom_in at 0x147d34ea0>, action_name='Zoom In'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoom.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom Out to right toolbar
Function: functools.partial(<function zoom_out at 0x147d36340>, action_name='Zoom Out'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoomout.svg, Toggle: False, Params: {}
Adding toolbar action: Add Selector to right toolbar
Function: functools.partial(<function add_selector at 0x147d371a0>, action_name='Add Selector'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/add_selector.svg, Toggle: False, Params: {}
Adding toolbar action: Select Navigator to right toolbar
Function: functools.partial(<function toggle_navigation_plots at 0x147d372e0>, action_name='Select Navigator'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/navigator.svg, Toggle: True, Params: {}
Initialized PlotState: <PlotState signal=<Signal1D, title: Temperature, dimensions: (|10)>, dimensions=1, dynamic=False>
Adding navigator signal: Voltage
Adding navigation plot states for signals: [<Signal1D, title: Voltage, dimensions: (|10)>]
{<spyde.drawing.plots.plot_window.PlotWindow(0x1697c93b0) at 0x158d85e80>: {<spyde.drawing.plots.plot_window.PlotWindow(0x16ad2f2b0) at 0x1699f6800>: {}}}
Adding navigation plot state for plot: <spyde.drawing.plots.plot.Plot(0x1697c79a0, parent=0x1697c51c0, pos=12,12, flags=(ItemUsesExtendedStyleOption|ItemSendsGeometryChanges)) at 0x16aba1700>
Plot states {<LazySignal1D, title: , dimensions: (|10)>: <PlotState signal=<LazySignal1D, title: , dimensions: (|10)>, dimensions=1, dynamic=False>, <Signal1D, title: Temperature, dimensions: (|10)>: <PlotState signal=<Signal1D, title: Temperature, dimensions: (|10)>, dimensions=1, dynamic=False>}
SubTB: [[]]
SubTB: [[], []]
SubTB: [[], [], []]
SubTB: [[], [], [], []]
SubTB: [[], [], [], [], []]
Adding toolbar action: Reset to right toolbar
Function: functools.partial(<function reset_view at 0x147d363e0>, action_name='Reset'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/fullsize.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom In to right toolbar
Function: functools.partial(<function zoom_in at 0x147d34ea0>, action_name='Zoom In'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoom.svg, Toggle: False, Params: {}
Adding toolbar action: Zoom Out to right toolbar
Function: functools.partial(<function zoom_out at 0x147d36340>, action_name='Zoom Out'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/zoomout.svg, Toggle: False, Params: {}
Adding toolbar action: Add Selector to right toolbar
Function: functools.partial(<function add_selector at 0x147d371a0>, action_name='Add Selector'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/add_selector.svg, Toggle: False, Params: {}
Adding toolbar action: Select Navigator to right toolbar
Function: functools.partial(<function toggle_navigation_plots at 0x147d372e0>, action_name='Select Navigator'), Icon: /Users/runner/work/spyde/spyde/spyde/drawing/toolbars/icons/navigator.svg, Toggle: True, Params: {}
Initialized PlotState: <PlotState signal=<Signal1D, title: Voltage, dimensions: (|10)>, dimensions=1, dynamic=False>

After opening the example data, we can see that the plot has default axis labels and scales. By left-clicking on the axis labels (e.g., “X Axis” or “Y Axis”), we can edit them to more meaningful names. Similarly, by left-clicking on the scale labels (e.g., “1.0” on the X-axis), we can change the scale values. This allows us to customize the plot to better represent the data being visualized.


editing axes

There is some limited support for mathematical expressions in the axis labels using LaTeX syntax. For example, we can label an axis as “$nm^{-1}$” to represent nanometers.


editing axes
# After editing the axis labels and scales, the plot now reflects these changes with the updated labels and scales.
# This enhances the clarity and interpretability of the plot, making it easier to understand the data being presented.
editing axes
Updating navigator plot image rectangle for:  [<spyde.drawing.plots.plot.Plot(0x1697c79a0, parent=0x1697c51c0, pos=12,12, flags=(ItemUsesExtendedStyleOption|ItemSendsGeometryChanges)) at 0x16aba1700>]
Traceback (most recent call last):
  File "/Users/runner/work/spyde/spyde/spyde/signal_tree.py", line 232, in _on_axis_field_edit
    plot.update_image_rectangle()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'update_image_rectangle'

Finally, we can see the main window with the updated axis labels and scales reflected in the plot.

Total running time of the script: (0 minutes 3.031 seconds)

Gallery generated by Sphinx-Gallery