pyqttoolkit 0.7.31__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.31 → pyqttoolkit-0.7.32}/PKG-INFO +1 -1
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/_version.py +3 -3
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/base.py +44 -17
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/PKG-INFO +1 -1
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/MANIFEST.in +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/README.md +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/application/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/application/application.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/application/garbage_collector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/colors/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/base.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/composite.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/default.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/environment.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/multi_json_file.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/with_signal.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/config/with_value_changed.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/data/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/data/bits.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/data/cache.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/data/interval.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/data/names.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/datetime/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/datetime/datetime.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/datetime/qdatetime.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/dependencies/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/errors/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/filesystem/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/logs/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/dataframe_metadata_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/dict_metadata_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/id_generator.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/metadata/metadata_manager_base.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/code_text.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/dataframetable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/dictpropertytree.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/dicttable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/json_text.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/list_model.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/module.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/roles.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/series_data.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/span.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/models/validation.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/add_signal.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/module_opening.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/events/rejectable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/launcher_config.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/modules/module.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/properties/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/properties/auto.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/properties/throttled.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/script_context.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/script_runner.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/scripting/script_template.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/autosave.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/email.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/event_registry.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/file_dialog.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/hotkey_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/link_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/message_board.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/module_service.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/object_converter.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/project_updater.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/task_runner.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/theme_manager.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/services/tool_window_service.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/viewmanagers/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/viewmanagers/tool.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/bulk_value_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/check_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/code/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/code/code_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/code/python_syntax.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/combo_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/count_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/datetime.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/datetime_range_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/default_text_line_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/delegates.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/dtype_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/editable_combo_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/file_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/icon.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/icon_button.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/json_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/labelled.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/collabsible.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/group_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/group_panel.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/lines.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/layout/link.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/line_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/linkable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/list_view.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/main_window.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/metadata_selector.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/modulewindow.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/legend_control.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/__init__.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/colorbar.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/colormap.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/matplotlib/font.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/plot_options.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/plot_toolbar_options.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/size.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/tool_type.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/plot/toolbar.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/popout.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/popup.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/property_tree.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/shrunk_push_button.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/steppable_combo_box.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/styleable.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/table.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/text_edit.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit/views/tool_window.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/SOURCES.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/dependency_links.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/requires.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/pyqttoolkit.egg-info/top_level.txt +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/setup.cfg +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/setup.py +0 -0
- {pyqttoolkit-0.7.31 → pyqttoolkit-0.7.32}/versioneer.py +0 -0
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-08-
|
|
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
|
|
|
@@ -847,12 +847,19 @@ class MatPlotLibBase(QWidget):
|
|
|
847
847
|
return
|
|
848
848
|
if hasattr(self.data, 'x_labels'):
|
|
849
849
|
step = self.data.x_tick_interval if hasattr(self.data, 'x_tick_interval') else None
|
|
850
|
-
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)
|
|
851
851
|
self._axes.set_xticks(x_ticks)
|
|
852
|
-
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
|
+
|
|
853
860
|
if hasattr(self.data, 'y_labels'):
|
|
854
861
|
step = self.data.y_tick_interval if hasattr(self.data, 'y_tick_interval') else None
|
|
855
|
-
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)
|
|
856
863
|
self._axes.set_yticks(y_ticks)
|
|
857
864
|
self._axes.set_yticklabels(y_labels)
|
|
858
865
|
self._adjust_to_yticklabels_width(y_labels)
|
|
@@ -861,28 +868,45 @@ class MatPlotLibBase(QWidget):
|
|
|
861
868
|
sizes = self._divider.get_horizontal()
|
|
862
869
|
ticklabels_font_family = self._axes.yaxis.get_ticklabels()[0].get_family() if labels else None
|
|
863
870
|
ticklabels_font_size = self._axes.yaxis.get_ticklabels()[0].get_size() if labels else None
|
|
864
|
-
width, _ = self.
|
|
865
|
-
labels,
|
|
871
|
+
width, _ = self._get_labels_width_height(
|
|
872
|
+
labels, font_family=ticklabels_font_family, font_size=ticklabels_font_size)
|
|
866
873
|
|
|
867
874
|
ylabel_font_family = self._axes.yaxis.get_label().get_family()
|
|
868
875
|
ylabel_font_size = self._axes.yaxis.get_label().get_size()
|
|
869
|
-
|
|
870
|
-
[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)
|
|
871
878
|
|
|
872
|
-
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
|
|
873
880
|
sizes[0] = Size.Fixed(width / self._figure.dpi)
|
|
874
881
|
self._divider.set_horizontal(sizes)
|
|
875
882
|
self.yTickLabelsWidthAdjusted.emit()
|
|
876
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
|
+
|
|
877
900
|
def _get_labels(self, labels, step, horizontal=True):
|
|
878
901
|
(x0, x1), (y0, y1) = self._get_xy_extents()
|
|
879
902
|
start, end = (int(x0), int(x1)) if horizontal else (int(y0), int(y1))
|
|
880
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)
|
|
881
909
|
if not (step and step > 0):
|
|
882
|
-
width, height = self._get_label_width_height(labels, horizontal=horizontal)
|
|
883
|
-
axes_bbox = self._axes.get_window_extent(self._figure.canvas.get_renderer()).transformed(self._figure.dpi_scale_trans.inverted())
|
|
884
|
-
plot_size = (axes_bbox.width if horizontal else axes_bbox.height) * self._figure.dpi
|
|
885
|
-
size = (width if horizontal else height)
|
|
886
910
|
if plot_size == 0 or size == 0:
|
|
887
911
|
n_labels = 16
|
|
888
912
|
else:
|
|
@@ -892,16 +916,18 @@ class MatPlotLibBase(QWidget):
|
|
|
892
916
|
step = int(visible_points / n_labels) + 1
|
|
893
917
|
else:
|
|
894
918
|
step = int(step)
|
|
919
|
+
if horizontal and (visible_points / step) * size > plot_size:
|
|
920
|
+
labels_rotation = 30
|
|
895
921
|
indexes = list(range(len(labels)))
|
|
896
922
|
display_labels = list(labels)
|
|
897
923
|
for i in indexes:
|
|
898
924
|
if i % step:
|
|
899
925
|
display_labels[i] = ''
|
|
900
|
-
return indexes, display_labels
|
|
901
|
-
|
|
902
|
-
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):
|
|
903
929
|
self._cached_label_width_height = self._cached_label_width_height or {}
|
|
904
|
-
cache_key = ''.join([str(i) for i in (
|
|
930
|
+
cache_key = (tuple(labels), ''.join([str(i) for i in (font_family, font_size)]))
|
|
905
931
|
if cache_key not in self._cached_label_width_height:
|
|
906
932
|
font = MatPlotLibFont(font=font_family) if font_family else MatPlotLibFont.default()
|
|
907
933
|
width = 0
|
|
@@ -912,7 +938,8 @@ class MatPlotLibBase(QWidget):
|
|
|
912
938
|
width = max(width, next_width)
|
|
913
939
|
height = max(height, next_height)
|
|
914
940
|
self._cached_label_width_height[cache_key] = width, height
|
|
915
|
-
|
|
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)
|
|
916
943
|
|
|
917
944
|
def _create_new_axes(self, nx=1, ny=1) -> Axes:
|
|
918
945
|
axes = Axes(self._figure, self._divider.get_position())
|
|
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.31 → 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
|