Repository: wright-group/WrightTools

Issue:
Undocumented argument `coloring` in plot_data
https://github.com/wright-group/WrightTools/blob/f740e82f9691a386c6997cb15a6399839ea84002/WrightTools/artists.py#L157
Raise issue in calibration for dimensionality too high
https://github.com/wright-group/WrightTools/blob/44da87cf4dfa18f87bdd699b832066ace50f6ec1/WrightTools/calibration.py#L263

This one I could see requiring changes to gracefully catch the exception thrown here, but Feel an exception is more clear than a print/return

Raise FileNotFoundError in from_shimadzu
https://github.com/wright-group/WrightTools/blob/a065ec336d8d8cccbc655f5419a91f74f325222e/WrightTools/data/_shimadzu.py#L47


Discussion:

Resolving patch:
diff --git a/WrightTools/artists.py b/WrightTools/artists.py
--- a/WrightTools/artists.py
+++ b/WrightTools/artists.py
@@ -68,12 +68,12 @@ def _parse_cmap(self, data=None, channel_index=None, **kwargs):
         kwargs['cmap'] = colormaps['default']
         return kwargs
 
-    def _apply_labels(self, label='none', xlabel=None, ylabel=None, data=None, channel_index=0):
+    def _apply_labels(self, autolabel='none', xlabel=None, ylabel=None, data=None, channel_index=0):
         """Apply x and y labels to axes.
 
         Parameters
         ----------
-        label : {'none', 'both', 'x', 'y'} (optional)
+        autolabel : {'none', 'both', 'x', 'y'} (optional)
             Label(s) to apply from data. Default is none.
         xlabel : string (optional)
             x label. Default is None.
@@ -85,9 +85,9 @@ def _apply_labels(self, label='none', xlabel=None, ylabel=None, data=None, chann
             Channel index. Default is 0.
         """
         # read from data
-        if label in ['xy', 'both', 'x'] and not xlabel:
+        if autolabel in ['xy', 'both', 'x'] and not xlabel:
             xlabel = data.axes[0].label
-        if label in ['xy', 'both', 'y'] and not ylabel:
+        if autolabel in ['xy', 'both', 'y'] and not ylabel:
             if data.dimensionality == 1:
                 ylabel = data.channels[channel_index].label
             elif data.dimensionality == 2:
@@ -173,7 +173,7 @@ def contour(self, *args, **kwargs):
         dynamic_range : boolean (optional)
             Force plotting of all contours, overloading for major extent. Only applies to signed
             data. Default is False.
-        label : {'none', 'both', 'x', 'y'}  (optional)
+        autolabel : {'none', 'both', 'x', 'y'}  (optional)
             Parameterize application of labels directly from data object. Default is none.
         xlabel : string (optional)
             xlabel. Default is None.
@@ -224,9 +224,9 @@ def contour(self, *args, **kwargs):
         if 'alpha' not in kwargs.keys():
             kwargs['alpha'] = 0.5
         # labels
-        self._apply_labels(label=kwargs.pop('label', False),
+        self._apply_labels(autolabel=kwargs.pop('autolabel', False),
                            xlabel=kwargs.pop('xlabel', None),
-                           ylabel=kwargs.pop('xlabel', None),
+                           ylabel=kwargs.pop('ylabel', None),
                            data=data, channel_index=channel_index)
         # call parent
         return matplotlib.axes.Axes.contour(self, *args, **kwargs)  # why can't I use super?
@@ -243,7 +243,7 @@ def contourf(self, *args, **kwargs):
         dynamic_range : boolean (optional)
             Force plotting of all contours, overloading for major extent. Only applies to signed
             data. Default is False.
-        label : {'none', 'both', 'x', 'y'}  (optional)
+        autolabel : {'none', 'both', 'x', 'y'}  (optional)
             Parameterize application of labels directly from data object. Default is none.
         xlabel : string (optional)
             xlabel. Default is None.
@@ -286,9 +286,9 @@ def contourf(self, *args, **kwargs):
         if 'levels' not in kwargs.keys():
             kwargs['levels'] = np.linspace(kwargs.pop('vmin'), kwargs.pop('vmax'), 256)
         # labels
-        self._apply_labels(label=kwargs.pop('label', False),
+        self._apply_labels(autolabel=kwargs.pop('autolabel', False),
                            xlabel=kwargs.pop('xlabel', None),
-                           ylabel=kwargs.pop('xlabel', None),
+                           ylabel=kwargs.pop('ylabel', None),
                            data=data, channel_index=channel_index)
         # Overloading contourf in an attempt to fix aliasing problems when saving vector graphics
         # see https://stackoverflow.com/questions/15822159
@@ -350,7 +350,7 @@ def pcolor(self, *args, **kwargs):
         dynamic_range : boolean (optional)
             Force plotting of all contours, overloading for major extent. Only applies to signed
             data. Default is False.
-        label : {'none', 'both', 'x', 'y'}  (optional)
+        autolabel : {'none', 'both', 'x', 'y'}  (optional)
             Parameterize application of labels directly from data object. Default is none.
         xlabel : string (optional)
             xlabel. Default is None.
@@ -391,9 +391,9 @@ def pcolor(self, *args, **kwargs):
             kwargs = self._parse_limits(zi=args[2], **kwargs)
             kwargs = self._parse_cmap(**kwargs)
         # labels
-        self._apply_labels(label=kwargs.pop('label', False),
+        self._apply_labels(autolabel=kwargs.pop('autolabel', False),
                            xlabel=kwargs.pop('xlabel', None),
-                           ylabel=kwargs.pop('xlabel', None),
+                           ylabel=kwargs.pop('ylabel', None),
                            data=data, channel_index=channel_index)
         # call parent
         return matplotlib.axes.Axes.pcolor(self, *args, **kwargs)  # why can't I use super?
@@ -410,7 +410,7 @@ def plot(self, *args, **kwargs):
         dynamic_range : boolean (optional)
             Force plotting of all contours, overloading for major extent. Only applies to signed
             data. Default is False.
-        label : {'none', 'both', 'x', 'y'}  (optional)
+        autolabel : {'none', 'both', 'x', 'y'}  (optional)
             Parameterize application of labels directly from data object. Default is none.
         xlabel : string (optional)
             xlabel. Default is None.
@@ -442,11 +442,12 @@ def plot(self, *args, **kwargs):
             data = None
             channel_index = 0
         # labels
-        self._apply_labels(label=kwargs.pop('label', False),
+        self._apply_labels(autolabel=kwargs.pop('autolabel', False),
                            xlabel=kwargs.pop('xlabel', None),
-                           ylabel=kwargs.pop('xlabel', None),
+                           ylabel=kwargs.pop('ylabel', None),
                            data=data, channel_index=channel_index)
         # call parent
+        print(kwargs)
         return matplotlib.axes.Axes.plot(self, *args, **kwargs)  # why can't I use super?
 
     def plot_data(self, data, channel=0, interpolate=False, coloring=None,


Test patch: