diff --git a/.gitignore b/.gitignore
index c99b104d..7b96eb27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -155,3 +155,14 @@ Thumbs.db
# Test
*.qgs~
+
+# QtCreator
+*.creator
+*.creator.user
+*.files
+*.cflags
+*.config
+*.cxxflags
+*.includes
+.qtc_clangd/
+
diff --git a/DataPlotly/core/plot_factory.py b/DataPlotly/core/plot_factory.py
index bc110632..19e40195 100644
--- a/DataPlotly/core/plot_factory.py
+++ b/DataPlotly/core/plot_factory.py
@@ -174,7 +174,6 @@ def add_source_field_or_expression(field_or_expression):
additional_info_expression, additional_needs_geom, additional_attrs = add_source_field_or_expression(
self.settings.layout['additional_info_expression']) if self.settings.layout[
'additional_info_expression'] else (None, False, set())
-
attrs = set().union(self.settings.data_defined_properties.referencedFields(),
x_attrs,
y_attrs,
diff --git a/DataPlotly/core/plot_types/__init__.py b/DataPlotly/core/plot_types/__init__.py
index 418cc9be..38e17c5e 100644
--- a/DataPlotly/core/plot_types/__init__.py
+++ b/DataPlotly/core/plot_types/__init__.py
@@ -18,3 +18,4 @@
from .scatter import ScatterPlotFactory
from .ternary import TernaryFactory
from .violin import ViolinFactory
+from .filledline import FilledLineFactory
diff --git a/DataPlotly/core/plot_types/filledline.py b/DataPlotly/core/plot_types/filledline.py
new file mode 100644
index 00000000..5c5ca081
--- /dev/null
+++ b/DataPlotly/core/plot_types/filledline.py
@@ -0,0 +1,59 @@
+"""
+Base class for trace factories
+
+.. note:: This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+"""
+
+import os
+from plotly import graph_objs
+from qgis.PyQt.QtGui import QIcon
+from DataPlotly.core.plot_types.plot_type import PlotType
+
+
+class FilledLineFactory(PlotType):
+ """
+ Factory for filled line scatter plots
+ """
+
+ @staticmethod
+ def type_name():
+ return 'filledline'
+
+ @staticmethod
+ def name():
+ return PlotType.tr('Filled Line Plot')
+
+ @staticmethod
+ def icon():
+ return QIcon(os.path.join(os.path.dirname(__file__), 'icons/filledline.svg'))
+
+ @staticmethod
+ def create_trace(settings):
+ # Only add filled band if both arrays present and lengths match the x axis
+ if settings.y and settings.z and isinstance(settings.y, (list, tuple)) and isinstance(settings.z, (list, tuple)):
+ if len(settings.x) == len(settings.y) == len(settings.z):
+ return [graph_objs.Scatter(
+ x=settings.x+settings.x[::-1], #forward and backward in reverse
+ y=settings.y+settings.z[::-1], #upper line + lower line in reverse order
+ mode='none', # no lines
+ fill='toself',
+ fillcolor=settings.data_defined_colors if settings.data_defined_colors else settings.properties.get('fill_color'),
+ showlegend=True,
+ hoverinfo='skip',
+ ids=settings.feature_ids,
+ name=settings.data_defined_legend_title if settings.data_defined_legend_title != '' else settings.properties['name']
+ )]
+ else:
+ # lengths mismatch -> skip fill to avoid runtime errors (you may want to log/warn)
+ pass
+
+ @staticmethod
+ def create_layout(settings):
+ layout = super(FilledLineFactory, FilledLineFactory).create_layout(settings)
+
+ layout['xaxis'].update(rangeslider=settings.layout['range_slider'])
+
+ return layout
diff --git a/DataPlotly/core/plot_types/icons/filledline.svg b/DataPlotly/core/plot_types/icons/filledline.svg
new file mode 100644
index 00000000..8343b4c9
--- /dev/null
+++ b/DataPlotly/core/plot_types/icons/filledline.svg
@@ -0,0 +1,99 @@
+
+
+
+
diff --git a/DataPlotly/core/plot_types/plot_type.py b/DataPlotly/core/plot_types/plot_type.py
index 5fcc7fee..4a36b525 100644
--- a/DataPlotly/core/plot_types/plot_type.py
+++ b/DataPlotly/core/plot_types/plot_type.py
@@ -131,7 +131,8 @@ def create_layout(settings):
"color": settings.layout.get('font_xticks_color', "#000"),
"family": settings.layout.get('font_xticks_family', "Arial"),
},
- 'gridcolor': settings.layout.get('gridcolor', '#bdbfc0')
+ 'gridcolor': settings.layout.get('gridcolor', '#bdbfc0'),
+ 'zerolinecolor': settings.layout.get('gridcolor', '#bdbfc0')
},
yaxis={
'title': {
@@ -149,7 +150,8 @@ def create_layout(settings):
"color": settings.layout.get('font_yticks_color', "#000"),
"family": settings.layout.get('font_yticks_family', "Arial"),
},
- 'gridcolor': settings.layout.get('gridcolor', '#bdbfc0')
+ 'gridcolor': settings.layout.get('gridcolor', '#bdbfc0'),
+ 'zerolinecolor': settings.layout.get('gridcolor', '#bdbfc0')
},
paper_bgcolor=bg_color,
plot_bgcolor=bg_color
diff --git a/DataPlotly/gui/plot_settings_widget.py b/DataPlotly/gui/plot_settings_widget.py
index 675afdca..33f76f89 100644
--- a/DataPlotly/gui/plot_settings_widget.py
+++ b/DataPlotly/gui/plot_settings_widget.py
@@ -264,7 +264,7 @@ def __init__(self, mode=MODE_CANVAS, parent=None, override_iface=None, message_b
self.register_data_defined_button(
self.in_color_defined_button, PlotSettings.PROPERTY_COLOR)
self.in_color_defined_button.registerEnabledWidget(
- self.in_color_combo, natural=False)
+ self. in_color_combo, natural=False)
self.in_color_defined_button.changed.connect(
self.data_defined_color_updated)
self.register_data_defined_button(
@@ -708,6 +708,7 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
for k, v in self.point_types.items():
self.point_combo.addItem(k, '', v)
+ # Line types
self.line_types = OrderedDict([
(GuiUtils.get_icon('solid.png'), self.tr('Solid Line')),
(GuiUtils.get_icon('dot.png'), self.tr('Dot Line')),
@@ -732,8 +733,6 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.line_combo.addItem(k, v)
self.line_combo_threshold.addItem(k,v)
-
-
# BarPlot bar mode
self.bar_mode_combo.clear()
self.bar_mode_combo.addItem(self.tr('Grouped'), 'group')
@@ -783,40 +782,70 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.color_scale_combo.addItem(k, v)
self.color_scale_data_defined_in.addItem(k, v)
- # according to the plot type, change the label names
+ # info combo for data hovering
+ self.info_combo.clear()
+ self.info_combo.addItem(self.tr('All Values'), 'all')
+ self.info_combo.addItem(self.tr('X Values'), 'x')
+ self.info_combo.addItem(self.tr('Y Values'), 'y')
+ self.info_combo.addItem(self.tr('No Data'), 'none')
+
+ # label text position choice
+ self.combo_text_position.clear()
+ self.combo_text_position.addItem(self.tr('Automatic'), 'auto')
+ self.combo_text_position.addItem(self.tr('Inside bar'), 'inside')
+ self.combo_text_position.addItem(self.tr('Outside bar'), 'outside')
+
+ # Violin side
+ self.violinSideCombo.clear()
+ self.violinSideCombo.addItem(self.tr('Both Sides'), 'both')
+ self.violinSideCombo.addItem(self.tr('Only Left'), 'negative')
+ self.violinSideCombo.addItem(self.tr('Only right'), 'positive')
- # BoxPlot
+ # according to the plot type, change the label names or settings
+ # for each change, one complete if-clause with closing else-statement to avoid wrong names/settings in some plottypes
+
+ # x_label
if self.ptype in ('box', 'violin'):
self.x_label.setText(self.tr('Grouping field \n(optional)'))
# set the horizontal and vertical size of the label and reduce the label font size
ff = QFont()
ff.setPointSizeF(8)
self.x_label.setFont(ff)
- self.x_label.setFixedWidth(100)
- self.orientation_label.setText(self.tr('Box orientation'))
- self.in_color_lab.setText(self.tr('Box color'))
- self.register_data_defined_button(
- self.in_color_defined_button, PlotSettings.PROPERTY_COLOR)
-
- elif self.ptype in ('scatter', 'ternary', 'bar', '2dhistogram', 'contour', 'polar','radar'):
- self.x_label.setText(self.tr('X field'))
- self.x_label.setFont(self.font())
-
- if self.ptype in ('scatter', 'ternary'):
- self.in_color_lab.setText(self.tr('Marker color'))
- elif self.ptype == 'bar':
- self.orientation_label.setText(self.tr('Bar orientation'))
- self.in_color_lab.setText(self.tr('Bar color'))
- self.register_data_defined_button(
- self.in_color_defined_button, PlotSettings.PROPERTY_COLOR)
-
+ #self.x_label.setFixedWidth(100)
elif self.ptype == 'pie':
self.x_label.setText(self.tr('Grouping field'))
ff = QFont()
- ff.setPointSizeF(8.5)
+ ff.setPointSizeF(8)
self.x_label.setFont(ff)
- self.x_label.setFixedWidth(80)
- # Register button again with more specific help text
+ #self.x_label.setFixedWidth(80)
+ else:
+ self.x_label.setText(self.tr('X field'))
+ self.x_label.setFont(self.font())
+
+ # y_label
+ if self.ptype in ('filledline'):
+ self.y_label.setText(self.tr('Upper Y field'))
+ else:
+ self.y_label.setText(self.tr('Y field'))
+
+ # z_label
+ if self.ptype in ('filledline'):
+ self.z_label.setText(self.tr('Lower Y field'))
+ else:
+ self.z_label.setText(self.tr('Z field'))
+
+ # in_color_label
+ if self.ptype in ('box', 'violin'):
+ self.in_color_lab.setText(self.tr('Box color'))
+ elif self.ptype in ('bar'):
+ self.in_color_lab.setText(self.tr('Bar color'))
+ elif self.ptype in ('filledlines'):
+ self.in_color_lab.setText(self.tr('Fill color'))
+ else:
+ self.in_color_lab.setText(self.tr('Marker color'))
+
+ # in_color_defined_button
+ if self.ptype in ('histogram', 'pie'):
self.in_color_defined_button.init(
PlotSettings.PROPERTY_COLOR, self.data_defined_properties.property(
PlotSettings.PROPERTY_COLOR),
@@ -827,73 +856,51 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
), None, False
)
self.in_color_defined_button.changed.connect(self._update_property)
+ else:
+ self.register_data_defined_button(
+ self.in_color_defined_button, PlotSettings.PROPERTY_COLOR)
- elif self.ptype == 'histogram':
- # Register button again with more specific help text
- self.in_color_defined_button.init(
- PlotSettings.PROPERTY_COLOR, self.data_defined_properties.property(
- PlotSettings.PROPERTY_COLOR),
- QgsPropertyDefinition(
- 'color', QgsPropertyDefinition.DataTypeString, 'Color Array',
- "string [r,g,b,a] as int 0-255 or #AARRGGBB as hex or color as color's name, "
- "or an array of such strings"
- ), None, False
- )
+ # Orientation label
+ if self.ptype in ('box', 'violin'):
+ self.orientation_label.setText(self.tr('Box orientation'))
+ else:
+ self.orientation_label.setText(self.tr('Bar orientation'))
- # change the label and the spin box value when the bar plot is chosen
+ # marker_size label and settings
if self.ptype == 'bar':
self.marker_size_lab.setText(self.tr('Bar width'))
self.marker_size.setValue(0.0)
self.marker_size.setClearValue(0.0, self.tr('Auto'))
self.marker_size.setToolTip(self.tr('Set to Auto to automatically resize the bar width'))
-
- # change the label and the spin box value when the scatter plot is chosen
- if self.ptype == 'scatter':
+ else:
self.marker_size_lab.setText(self.tr('Marker size'))
self.marker_size.setValue(10)
+ self.marker_size.setClearValue(10.0)
+ self.marker_size.setToolTip('')
- # info combo for data hovering
- self.info_combo.clear()
- self.info_combo.addItem(self.tr('All Values'), 'all')
- self.info_combo.addItem(self.tr('X Values'), 'x')
- self.info_combo.addItem(self.tr('Y Values'), 'y')
- self.info_combo.addItem(self.tr('No Data'), 'none')
-
- # label text position choice
- self.combo_text_position.clear()
- self.combo_text_position.addItem(self.tr('Automatic'), 'auto')
- self.combo_text_position.addItem(self.tr('Inside bar'), 'inside')
- self.combo_text_position.addItem(self.tr('Outside bar'), 'outside')
-
- # Violin side
- self.violinSideCombo.clear()
- self.violinSideCombo.addItem(self.tr('Both Sides'), 'both')
- self.violinSideCombo.addItem(self.tr('Only Left'), 'negative')
- self.violinSideCombo.addItem(self.tr('Only right'), 'positive')
-
- # dictionary with all the widgets and the plot they belong to
+ # dictionary with all the widgets and the plot they belong to
self.widgetType = {
# plot properties
self.layer_combo: ['all'],
self.feature_subset_defined_button: ['all'],
- self.x_label: ['scatter', 'bar', 'box', 'pie', '2dhistogram','histogram', 'polar', 'ternary', 'violin', 'contour'],
- self.x_combo: ['scatter', 'bar', 'box','pie', '2dhistogram','histogram', 'polar', 'ternary', 'violin', 'contour'],
+ self.x_label: ['scatter', 'bar', 'box', 'pie', '2dhistogram','histogram', 'polar', 'ternary', 'violin', 'contour', 'filledline'],
+ self.x_combo: ['scatter', 'bar', 'box', 'pie', '2dhistogram','histogram', 'polar', 'ternary', 'violin', 'contour', 'filledline'],
self.y_fields_label: ['radar'],
self.y_fields_combo: ['radar'],
self.y_combo_radar_label: ['radar'],
self.y_radar_label: ['radar'],
- self.y_label: ['scatter', 'bar', 'box', 'pie', '2dhistogram', 'polar', 'ternary', 'contour', 'violin'],
- self.y_combo: ['scatter', 'bar', 'box', 'pie', '2dhistogram', 'polar', 'ternary', 'contour', 'violin'],
- self.z_label: ['ternary'],
- self.z_combo: ['ternary'],
+ self.y_label: ['scatter', 'bar', 'box', 'pie', '2dhistogram', 'polar', 'ternary', 'contour', 'violin', 'filledline'],
+ self.y_combo: ['scatter', 'bar', 'box', 'pie', '2dhistogram', 'polar', 'ternary', 'contour', 'violin', 'filledline'],
+ self.z_label: ['ternary', 'filledline'],
+ self.z_combo: ['ternary', 'filledline'],
self.info_label: ['scatter'],
self.info_combo: ['scatter'],
- self.in_color_lab: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'violin'],
- self.in_color_combo: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'violin'],
- self.in_color_defined_button: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary'],
- self.color_scale_data_defined_in: ['scatter', 'bar', 'pie', 'histogram', 'ternary'],
- self.color_scale_data_defined_in_label: ['scatter', 'bar', 'ternary'],
- self.color_scale_data_defined_in_check: ['scatter', 'bar', 'ternary'],
+ self.in_color_lab: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'violin', 'filledline'],
+ self.in_color_combo: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'violin', 'filledline'],
+ self.in_color_defined_button: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'filledline'],
+ self.color_scale_data_defined_in: ['scatter', 'bar', 'pie', 'histogram', 'ternary', 'filledline'],
+ self.color_scale_data_defined_in_label: ['scatter', 'bar', 'ternary', 'filledline'],
+ self.color_scale_data_defined_in_check: ['scatter', 'bar', 'ternary', 'filledline'],
self.color_scale_data_defined_in_invert_check: ['bar', 'ternary'],
self.out_color_lab: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'violin'],
self.out_color_combo: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'ternary', 'violin'],
@@ -904,12 +911,12 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.marker_size_lab: ['scatter', 'polar', 'ternary', 'bar', 'radar'],
self.marker_size: ['scatter', 'polar', 'ternary', 'bar', 'radar'],
self.size_defined_button: ['scatter', 'polar','ternary', 'bar'],
- self.marker_type_lab: ['scatter', 'polar','radar'],
- self.marker_type_combo: ['scatter', 'polar','radar'],
+ self.marker_type_lab: ['scatter', 'polar', 'radar'],
+ self.marker_type_combo: ['scatter', 'polar', 'radar'],
self.alpha_lab: ['scatter', 'bar', 'box', 'histogram', 'polar','radar', 'ternary', 'violin', 'contour'],
self.opacity_widget: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'radar','ternary', 'violin', 'contour'],
self.properties_group_box: ['scatter', 'bar', 'box', 'pie', 'histogram', 'polar', 'radar','ternary', 'contour', '2dhistogram',
- 'violin'],
+ 'violin', 'filledline'],
self.bar_mode_lab: ['bar', 'histogram'],
self.bar_mode_combo: ['bar', 'histogram'],
self.legend_label: ['all'],
@@ -926,57 +933,57 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.show_lines_check: ['contour'],
# layout customization
self.show_legend_check: ['all'],
- self.orientation_legend_check: ['scatter', 'bar', 'box', 'histogram', 'ternary', 'pie', 'violin'],
+ self.orientation_legend_check: ['scatter', 'bar', 'box', 'histogram', 'ternary', 'pie', 'violin','filledline'],
self.plot_title_lab: ['all'],
self.plot_title_line: ['all'],
self.plot_title_defined_button: ['all'],
self.font_title_label: ['all'],
- self.font_xlabel_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.font_xticks_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin'],
- self.font_ylabel_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.font_yticks_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin'],
+ self.font_xlabel_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.font_xticks_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin','filledline'],
+ self.font_ylabel_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.font_yticks_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin','filledline'],
self.font_legend_label: ['all'],
self.font_title_style: ['all'],
- self.font_xlabel_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.font_xticks_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar', 'radar', 'violin'],
- self.font_ylabel_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.font_yticks_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin'],
+ self.font_xlabel_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.font_xticks_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar', 'radar', 'violin','filledline'],
+ self.font_ylabel_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.font_yticks_style: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin','filledline'],
self.font_legend_style: ['all'],
self.font_title_color: ['all'],
- self.font_xlabel_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.font_xticks_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin'],
+ self.font_xlabel_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.font_xticks_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin','filledline'],
self.font_legend_color: ['all'],
- self.font_ylabel_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.font_yticks_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin'],
- self.x_axis_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin'],
- self.x_axis_title: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin'],
- self.x_axis_title_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin'],
- self.y_axis_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin'],
- self.y_axis_title: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin'],
- self.y_axis_title_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin'],
+ self.font_ylabel_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.font_yticks_color: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'polar','radar', 'violin','filledline'],
+ self.x_axis_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin','filledline'],
+ self.x_axis_title: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin','filledline'],
+ self.x_axis_title_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin','filledline'],
+ self.y_axis_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin','filledline'],
+ self.y_axis_title: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin','filledline'],
+ self.y_axis_title_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'ternary', 'violin','filledline'],
self.z_axis_label: ['ternary'],
self.z_axis_title: ['ternary'],
self.z_axis_title_defined_button: ['ternary'],
- self.x_axis_mode_label: ['scatter', 'box'],
- self.y_axis_mode_label: ['scatter', 'box'],
- self.x_axis_mode_combo: ['scatter', 'box'],
- self.y_axis_mode_combo: ['scatter', 'box'],
- self.invert_x_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram'],
- self.invert_y_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram'],
- self.x_axis_bounds_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.x_axis_min_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.x_axis_max_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.x_axis_min: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.x_axis_max: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.x_axis_min_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.x_axis_max_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_bounds_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_min_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_max_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_min: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_max: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_min_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
- self.y_axis_max_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin'],
+ self.x_axis_mode_label: ['scatter', 'box','filledline'],
+ self.y_axis_mode_label: ['scatter', 'box','filledline'],
+ self.x_axis_mode_combo: ['scatter', 'box','filledline'],
+ self.y_axis_mode_combo: ['scatter', 'box','filledline'],
+ self.invert_x_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram','filledline'],
+ self.invert_y_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram','filledline'],
+ self.x_axis_bounds_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.x_axis_min_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.x_axis_max_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.x_axis_min: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.x_axis_max: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.x_axis_min_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.x_axis_max_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_bounds_check: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_min_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_max_label: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_min: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_max: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_min_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
+ self.y_axis_max_defined_button: ['scatter', 'bar', 'box', 'histogram', '2dhistogram', 'violin','filledline'],
self.orientation_label: ['bar', 'box', 'histogram', 'violin'],
self.orientation_combo: ['bar', 'box', 'histogram', 'violin'],
self.box_statistic_label: ['box'],
@@ -987,8 +994,8 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.range_slider_combo: ['scatter'],
self.hist_norm_label: ['histogram'],
self.hist_norm_combo: ['histogram'],
- self.additional_info_label: ['scatter', 'ternary', 'bar'],
- self.additional_info_combo: ['scatter', 'ternary', 'bar'],
+ self.additional_info_label: ['scatter', 'ternary', 'bar','filledline'],
+ self.additional_info_combo: ['scatter', 'ternary', 'bar','filledline'],
self.hover_as_text_check: ['scatter'],
self.label_text_position: ['bar'],
self.combo_text_position: ['bar'],
@@ -1009,7 +1016,6 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.line_threshold_value: ['radar'],
self.line_combo_threshold: ['radar'],
self.threshold_value_label: ['radar']
-
}
# enable the widget according to the plot type
for k, v in self.widgetType.items():
@@ -1030,7 +1036,9 @@ def refreshWidgets(self): # pylint: disable=too-many-statements,too-many-branch
self.color_scale_data_defined_in_check.setVisible(False)
self.color_scale_data_defined_in_invert_check.setVisible(False)
- self.refreshWidgets3()
+ # uncommenting causes that the point_combo and label is visible everywhere!
+ # is that needed in radar plot?
+ #self.refreshWidgets3()
def refreshWidgets2(self):
"""
@@ -1091,7 +1099,10 @@ def setLegend(self):
self.legend_title.setText(self.y_combo.currentText())
elif self.ptype == 'histogram':
self.legend_title.setText(self.x_combo.currentText())
-
+ elif self.ptype == 'filledline':
+ legend_title_string = (
+ f'{self.y_combo.currentText()} - {self.z_combo.currentText()}')
+ self.legend_title.setText(legend_title_string)
else:
legend_title_string = (
f'{self.x_combo.currentText()} - {self.y_combo.currentText()}')
@@ -1106,7 +1117,8 @@ def get_settings(self) -> PlotSettings: # pylint: disable=R0915
# if colorscale should be visible or not
color_scale_visible = self.color_scale_data_defined_in_check.isVisible(
) and self.color_scale_data_defined_in_check.isChecked()
-
+ # get the Qcolor class once
+ color = self.in_color_combo.color()
# dictionary of all the plot properties
plot_properties = {'custom': [self.x_combo.currentText()],
'hover_text': self.info_combo.currentData(),
@@ -1116,6 +1128,7 @@ def get_settings(self) -> PlotSettings: # pylint: disable=R0915
'y_name': self.y_combo.currentText(),
'z_name': self.z_combo.currentText(),
'in_color': self.in_color_combo.color().name(),
+ 'fill_color': f"rgba({color.red()},{color.green()},{color.blue()},{color.alphaF()})",
'show_colorscale_legend': color_scale_visible,
'invert_color_scale': self.color_scale_data_defined_in_invert_check.isChecked(),
'out_color': self.out_color_combo.color().name(),
diff --git a/DataPlotly/ui/dataplotly_dockwidget_base.ui b/DataPlotly/ui/dataplotly_dockwidget_base.ui
index 585101ee..af41f737 100644
--- a/DataPlotly/ui/dataplotly_dockwidget_base.ui
+++ b/DataPlotly/ui/dataplotly_dockwidget_base.ui
@@ -322,7 +322,7 @@ QListWidget::item::selected {
0
0
673
- 1200
+ 1170
@@ -356,59 +356,39 @@ QListWidget::item::selected {
Plot Parameters
-
- -
-
-
- -
-
-
- ...
-
-
-
- -
-
+
+
-
+
- Linked map
+ Use only features inside atlas feature
- -
-
-
- Y field
-
-
+
-
+
- -
-
-
- true
-
+
-
+
- Use only selected features
+ Y fields
- -
-
+
-
+
- Use only features visible in map
+ Y label
- -
-
-
- true
-
+
-
+
- Use only visible features
+ Y field
- -
+
-
@@ -433,44 +413,64 @@ QListWidget::item::selected {
- -
-
+
-
+
- Y fields
+ Layer
- -
-
-
- -
+
-
Z field
- -
+
-
- -
+
-
- -
-
-
- Feature subset
-
-
+
-
+
- -
-
+
-
+
+
+ -
+
- Use only features inside atlas feature
+ Use only features visible in map
- -
+
-
+
+
-
+
+
+ true
+
+
+ Use only selected features
+
+
+
+ -
+
+
+ true
+
+
+ Use only visible features
+
+
+
+
+
+ -
@@ -480,25 +480,29 @@ QListWidget::item::selected {
- -
-
+
-
+
+
+ Feature subset
+
+
- -
-
+
-
+
- Layer
+ ...
- -
-
+
-
+
- Y label
+ Linked map
- -
-
+
-
+
@@ -508,29 +512,66 @@ QListWidget::item::selected {
Properties
-
- -
-
+
+
-
+
- ...
+ Manual bin size
- -
-
+
-
+
+
-
+
+
+ true
+
+
+ Invert histogram direction
+
+
+
+ -
+
+
+ true
+
+
+ Cumulative histogram
+
+
+
+
+
+ -
+
- Legend title
+ Stroke width
- -
-
+
-
+
+
+ -
+
- Show statistics
+ Hover tooltip
- -
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ -
-
@@ -554,51 +595,27 @@ QListWidget::item::selected {
- -
-
-
- -
-
-
- Marker color
-
-
-
- -
-
-
- Stroke color
-
-
-
- -
-
+
-
+
...
- -
-
-
- -
+
-
- -
-
+
-
+
- Hover tooltip
+ Threshold
-
-
- -
-
-
- Contour type
+
+ true
- -
+
-
-
@@ -615,135 +632,81 @@ QListWidget::item::selected {
- -
-
-
- -
-
-
- ...
-
-
-
- -
-
-
- Label text position
-
-
-
- -
-
-
- Threshold
-
-
- true
-
-
-
- -
+
-
- -
-
+
-
+
- Marker size
+ Show statistics
- -
-
+
-
+
- -
-
-
-
- 0
- 0
-
+
-
+
+
+ 99990000.000000000000000
+
+
+ 1.000000000000000
- -
-
+
-
+
- Bar orientation
+ Color scale
- -
-
+
-
+
- Violin side
+ Pie hole
- -
-
+
-
+
- Opacity
+ Outliers
- -
+
-
- -
-
-
- Threshold line type
-
-
-
- -
+
-
Qt::StrongFocus
- -
-
-
- -
-
+
-
+
- Line type
+ ...
- -
-
+
-
+
- Normalization
+ Threshold value
- -
-
-
- -
-
-
- -
-
-
- Manual bin size
-
-
+
-
+
- -
+
-
- -
-
-
- Pie hole
-
-
-
- -
+
-
false
@@ -756,139 +719,169 @@ QListWidget::item::selected {
- -
-
-
-
- 0
- 0
-
+
-
+
+
+ -
+
+
+ Violin side
- -
-
+
-
+
- Fill
+ Color scale
- -
-
+
-
+
+
+ -
+
- Outliers
+ Label text position
- -
-
+
-
+
- Stroke width
+ Opacity
- -
-
+
-
+
- ...
+ Stroke color
- -
-
-
- 0.950000000000000
-
-
- 0.050000000000000
-
-
- 0.000000000000000
-
-
- false
+
-
+
+
+ Line type
- -
-
+
-
+
- Color scale
+ Hover label as text
- -
-
+
-
+
+
+ If checked, box plots will be overlaid on top of violin plots
+
- ...
+ Include box plots
+
+
+ true
- -
-
+
-
+
- -
-
+
-
+
- Hover label as text
+ Contour type
- -
-
+
-
+
+
+ -
+
- Point type
+ Fill
- -
-
-
- If checked, box plots will be overlaid on top of violin plots
+
-
+
+
+ 0.950000000000000
+
+
+ 0.050000000000000
+
+
+ 0.000000000000000
+
+
+ false
+
+
+ -
+
- Include box plots
+ Normalization
-
- true
+
+
+ -
+
+
+ Bar orientation
- -
-
+
-
+
-
-
-
+
+
+
+ 0
+ 0
+
+
+
true
+
+
+ -
+
- Invert histogram direction
+ ...
-
-
-
- true
+
+
+ Marker size
+
+
+ -
+
+
+ -
+
- Cumulative histogram
+ ...
- -
-
-
- -
-
-
- Marker type
-
-
+
-
+
- -
+
-
Show mean line
@@ -898,33 +891,51 @@ QListWidget::item::selected {
- -
-
+
-
+
- Color scale
+ ...
- -
-
+
-
+
+
+ Marker color
+
+
- -
-
-
- 99990000.000000000000000
+
-
+
+
+ Marker type
-
- 1.000000000000000
+
+
+ -
+
+
+ Legend title
- -
-
+
-
+
- -
-
+
-
+
+
+ -
+
- Threshold value
+ Point type
+
+
+
+ -
+
+
+ Threshold line type
@@ -970,8 +981,8 @@ QListWidget::item::selected {
0
0
- 449
- 820
+ 687
+ 745
@@ -1344,39 +1355,19 @@ QListWidget::item::selected {
-
-
-
- QgsFontButton::ModeQFont
-
-
+
-
-
-
- QgsFontButton::ModeQFont
-
-
+
-
-
-
- QgsFontButton::ModeQFont
-
-
+
-
-
-
- QgsFontButton::ModeQFont
-
-
+
-
-
-
- QgsFontButton::ModeQFont
-
-
+
-
@@ -1385,11 +1376,7 @@ QListWidget::item::selected {
-
-
-
- QgsFontButton::ModeQFont
-
-
+
-