pyqttoolkit 0.7.30__tar.gz → 0.7.32__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/PKG-INFO +2 -2
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/_version.py +3 -3
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/base.py +49 -20
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/PKG-INFO +2 -2
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/MANIFEST.in +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/README.md +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/application/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/application/application.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/application/garbage_collector.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/colors/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/base.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/composite.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/default.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/environment.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/multi_json_file.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/with_signal.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/config/with_value_changed.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/data/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/data/bits.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/data/cache.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/data/interval.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/data/names.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/datetime/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/datetime/datetime.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/datetime/qdatetime.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/dependencies/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/errors/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/filesystem/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/logs/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/dataframe_metadata_manager.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/dict_metadata_manager.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/id_generator.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/metadata_manager_base.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/code_text.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/dataframetable.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/dictpropertytree.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/dicttable.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/json_text.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/list_model.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/module.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/roles.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/series_data.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/span.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/models/validation.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/add_signal.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/module_opening.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/rejectable.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/launcher_config.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/module.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/properties/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/properties/auto.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/properties/throttled.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/script_context.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/script_runner.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/script_template.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/autosave.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/email.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/event_registry.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/file_dialog.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/hotkey_manager.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/link_manager.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/message_board.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/module_service.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/object_converter.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/project_updater.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/task_runner.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/theme_manager.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/services/tool_window_service.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/viewmanagers/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/viewmanagers/tool.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/bulk_value_selector.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/check_box.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/code/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/code/code_edit.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/code/python_syntax.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/combo_box.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/count_selector.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/datetime.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/datetime_range_selector.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/default_text_line_edit.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/delegates.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/dtype_edit.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/editable_combo_box.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/file_selector.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/icon.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/icon_button.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/json_edit.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/labelled.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/collabsible.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/group_box.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/group_panel.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/lines.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/link.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/line_edit.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/linkable.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/list_view.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/main_window.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/metadata_selector.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/modulewindow.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/legend_control.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/__init__.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/colorbar.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/colormap.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/font.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/plot_options.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/plot_toolbar_options.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/size.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/tool_type.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/toolbar.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/popout.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/popup.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/property_tree.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/shrunk_push_button.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/steppable_combo_box.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/styleable.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/table.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/text_edit.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/views/tool_window.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/SOURCES.txt +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/dependency_links.txt +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/requires.txt +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/top_level.txt +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/setup.cfg +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/setup.py +0 -0
- {pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyqttoolkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.32
|
|
4
4
|
Summary: A toolkit for PyQt 5
|
|
5
5
|
Home-page: https://github.com/Simmovation/pyqttoolkit
|
|
6
6
|
Author: Simmovation Ltd
|
|
@@ -12,5 +12,5 @@ Description: # PyQtToolkit
|
|
|
12
12
|
Platform: any
|
|
13
13
|
Requires-Python: >=3.6
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Provides-Extra: test
|
|
16
15
|
Provides-Extra: publish
|
|
16
|
+
Provides-Extra: test
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-08-16T06:40:41-0600",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.7.
|
|
14
|
+
"full-revisionid": "a8f0f66d358fa092957fa5059ebb44995201536b",
|
|
15
|
+
"version": "0.7.32"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -29,7 +29,6 @@ from matplotlib.figure import Figure
|
|
|
29
29
|
from matplotlib.widgets import RectangleSelector, SpanSelector
|
|
30
30
|
from mpl_toolkits.axes_grid1 import Size, Divider
|
|
31
31
|
from mpl_toolkits.axes_grid1.mpl_axes import Axes
|
|
32
|
-
from matplotlib.projections import PolarAxes
|
|
33
32
|
|
|
34
33
|
import pandas as pd
|
|
35
34
|
|
|
@@ -470,6 +469,9 @@ class MatPlotLibBase(QWidget):
|
|
|
470
469
|
min_ -= diff * skew
|
|
471
470
|
return min_, max_
|
|
472
471
|
|
|
472
|
+
def _ensure_x_limit(self, _axes, x_limit):
|
|
473
|
+
return float(x_limit)
|
|
474
|
+
|
|
473
475
|
def _do_set_axes_limits(self, axes):
|
|
474
476
|
try:
|
|
475
477
|
self._setting_axis_limits = True
|
|
@@ -480,8 +482,8 @@ class MatPlotLibBase(QWidget):
|
|
|
480
482
|
if self._options_view is not None:
|
|
481
483
|
if self._options_view.x_limits:
|
|
482
484
|
self._options_view.setXLimits(
|
|
483
|
-
|
|
484
|
-
|
|
485
|
+
self._ensure_x_limit(axes, x_min),
|
|
486
|
+
self._ensure_x_limit(axes, x_max))
|
|
485
487
|
if self._options_view.y_limits:
|
|
486
488
|
self._options_view.setYLimits(float(y_min), float(y_max))
|
|
487
489
|
axes.set_xlim(*_safe_limits(x_min, x_max))
|
|
@@ -845,12 +847,19 @@ class MatPlotLibBase(QWidget):
|
|
|
845
847
|
return
|
|
846
848
|
if hasattr(self.data, 'x_labels'):
|
|
847
849
|
step = self.data.x_tick_interval if hasattr(self.data, 'x_tick_interval') else None
|
|
848
|
-
x_ticks, x_labels = self._get_labels(self.data.x_labels, step, horizontal=True)
|
|
850
|
+
x_ticks, x_labels, x_ticks_rotation = self._get_labels(self.data.x_labels, step, horizontal=True)
|
|
849
851
|
self._axes.set_xticks(x_ticks)
|
|
850
|
-
self.
|
|
852
|
+
if hasattr(self.data, 'x_ticks_rotation'):
|
|
853
|
+
rotation = x_ticks_rotation if np.isnan(self.data.x_ticks_rotation) else self.data.x_ticks_rotation
|
|
854
|
+
self._axes.set_xticklabels(
|
|
855
|
+
x_labels, rotation=rotation, ha='right' if rotation else 'center')
|
|
856
|
+
self._adjust_to_xticklabels_height(x_labels, rotation)
|
|
857
|
+
else:
|
|
858
|
+
self._axes.set_xticklabels(x_labels)
|
|
859
|
+
|
|
851
860
|
if hasattr(self.data, 'y_labels'):
|
|
852
861
|
step = self.data.y_tick_interval if hasattr(self.data, 'y_tick_interval') else None
|
|
853
|
-
y_ticks, y_labels = self._get_labels(self.data.y_labels, step, horizontal=False)
|
|
862
|
+
y_ticks, y_labels, _ = self._get_labels(self.data.y_labels, step, horizontal=False)
|
|
854
863
|
self._axes.set_yticks(y_ticks)
|
|
855
864
|
self._axes.set_yticklabels(y_labels)
|
|
856
865
|
self._adjust_to_yticklabels_width(y_labels)
|
|
@@ -859,28 +868,45 @@ class MatPlotLibBase(QWidget):
|
|
|
859
868
|
sizes = self._divider.get_horizontal()
|
|
860
869
|
ticklabels_font_family = self._axes.yaxis.get_ticklabels()[0].get_family() if labels else None
|
|
861
870
|
ticklabels_font_size = self._axes.yaxis.get_ticklabels()[0].get_size() if labels else None
|
|
862
|
-
width, _ = self.
|
|
863
|
-
labels,
|
|
871
|
+
width, _ = self._get_labels_width_height(
|
|
872
|
+
labels, font_family=ticklabels_font_family, font_size=ticklabels_font_size)
|
|
864
873
|
|
|
865
874
|
ylabel_font_family = self._axes.yaxis.get_label().get_family()
|
|
866
875
|
ylabel_font_size = self._axes.yaxis.get_label().get_size()
|
|
867
|
-
|
|
868
|
-
[self._axes.get_ylabel()],
|
|
876
|
+
y_label_width, _ = self._get_labels_width_height(
|
|
877
|
+
[self._axes.get_ylabel()], font_family=ylabel_font_family, font_size=ylabel_font_size, rotation=90)
|
|
869
878
|
|
|
870
|
-
width += y_label_width + 0.
|
|
879
|
+
width += y_label_width + 0.3 * self._figure.dpi # Need this offset to account for the tick marks and ylabel
|
|
871
880
|
sizes[0] = Size.Fixed(width / self._figure.dpi)
|
|
872
881
|
self._divider.set_horizontal(sizes)
|
|
873
882
|
self.yTickLabelsWidthAdjusted.emit()
|
|
874
883
|
|
|
884
|
+
def _adjust_to_xticklabels_height(self, labels, rotation=None):
|
|
885
|
+
sizes = self._divider.get_vertical()
|
|
886
|
+
ticklabels_font_family = self._axes.xaxis.get_ticklabels()[0].get_family() if labels else None
|
|
887
|
+
ticklabels_font_size = self._axes.xaxis.get_ticklabels()[0].get_size() if labels else None
|
|
888
|
+
_, height = self._get_labels_width_height(
|
|
889
|
+
labels, font_family=ticklabels_font_family, font_size=ticklabels_font_size, rotation=rotation)
|
|
890
|
+
|
|
891
|
+
xlabel_font_family = self._axes.xaxis.get_label().get_family()
|
|
892
|
+
xlabel_font_size = self._axes.xaxis.get_label().get_size()
|
|
893
|
+
_, x_label_height = self._get_labels_width_height(
|
|
894
|
+
[self._axes.get_xlabel()], font_family=xlabel_font_family, font_size=xlabel_font_size)
|
|
895
|
+
|
|
896
|
+
height += x_label_height + 0.2 * self._figure.dpi # Need this offset to account for the tick marks and xlabel
|
|
897
|
+
sizes[0] = Size.Fixed(height / self._figure.dpi)
|
|
898
|
+
self._divider.set_vertical(sizes)
|
|
899
|
+
|
|
875
900
|
def _get_labels(self, labels, step, horizontal=True):
|
|
876
901
|
(x0, x1), (y0, y1) = self._get_xy_extents()
|
|
877
902
|
start, end = (int(x0), int(x1)) if horizontal else (int(y0), int(y1))
|
|
878
903
|
visible_points = end - start
|
|
904
|
+
labels_rotation = None
|
|
905
|
+
axes_bbox = self._axes.get_window_extent(self._figure.canvas.get_renderer()).transformed(self._figure.dpi_scale_trans.inverted())
|
|
906
|
+
plot_size = (axes_bbox.width if horizontal else axes_bbox.height) * self._figure.dpi
|
|
907
|
+
width, height = self._get_labels_width_height(labels)
|
|
908
|
+
size = (width if horizontal else height)
|
|
879
909
|
if not (step and step > 0):
|
|
880
|
-
width, height = self._get_label_width_height(labels, horizontal=horizontal)
|
|
881
|
-
axes_bbox = self._axes.get_window_extent(self._figure.canvas.get_renderer()).transformed(self._figure.dpi_scale_trans.inverted())
|
|
882
|
-
plot_size = (axes_bbox.width if horizontal else axes_bbox.height) * self._figure.dpi
|
|
883
|
-
size = (width if horizontal else height)
|
|
884
910
|
if plot_size == 0 or size == 0:
|
|
885
911
|
n_labels = 16
|
|
886
912
|
else:
|
|
@@ -890,16 +916,18 @@ class MatPlotLibBase(QWidget):
|
|
|
890
916
|
step = int(visible_points / n_labels) + 1
|
|
891
917
|
else:
|
|
892
918
|
step = int(step)
|
|
919
|
+
if horizontal and (visible_points / step) * size > plot_size:
|
|
920
|
+
labels_rotation = 30
|
|
893
921
|
indexes = list(range(len(labels)))
|
|
894
922
|
display_labels = list(labels)
|
|
895
923
|
for i in indexes:
|
|
896
924
|
if i % step:
|
|
897
925
|
display_labels[i] = ''
|
|
898
|
-
return indexes, display_labels
|
|
899
|
-
|
|
900
|
-
def
|
|
926
|
+
return indexes, display_labels, labels_rotation
|
|
927
|
+
|
|
928
|
+
def _get_labels_width_height(self, labels, font_family=None, font_size=None, rotation=None):
|
|
901
929
|
self._cached_label_width_height = self._cached_label_width_height or {}
|
|
902
|
-
cache_key = ''.join([str(i) for i in (
|
|
930
|
+
cache_key = (tuple(labels), ''.join([str(i) for i in (font_family, font_size)]))
|
|
903
931
|
if cache_key not in self._cached_label_width_height:
|
|
904
932
|
font = MatPlotLibFont(font=font_family) if font_family else MatPlotLibFont.default()
|
|
905
933
|
width = 0
|
|
@@ -910,7 +938,8 @@ class MatPlotLibBase(QWidget):
|
|
|
910
938
|
width = max(width, next_width)
|
|
911
939
|
height = max(height, next_height)
|
|
912
940
|
self._cached_label_width_height[cache_key] = width, height
|
|
913
|
-
|
|
941
|
+
width, height = self._cached_label_width_height[cache_key]
|
|
942
|
+
return (abs(width * np.cos(np.radians(rotation))), abs(width * np.sin(np.radians(rotation)) + height)) if rotation is not None else (width, height)
|
|
914
943
|
|
|
915
944
|
def _create_new_axes(self, nx=1, ny=1) -> Axes:
|
|
916
945
|
axes = Axes(self._figure, self._divider.get_position())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyqttoolkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.32
|
|
4
4
|
Summary: A toolkit for PyQt 5
|
|
5
5
|
Home-page: https://github.com/Simmovation/pyqttoolkit
|
|
6
6
|
Author: Simmovation Ltd
|
|
@@ -12,5 +12,5 @@ Description: # PyQtToolkit
|
|
|
12
12
|
Platform: any
|
|
13
13
|
Requires-Python: >=3.6
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Provides-Extra: test
|
|
16
15
|
Provides-Extra: publish
|
|
16
|
+
Provides-Extra: test
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqttoolkit-0.7.30 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/dataframe_metadata_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|