Skip to content
Snippets Groups Projects
Commit 22f42e76 authored by Julius's avatar Julius
Browse files

removed intermediate step for scales, added scales

parent c3045c5a
No related branches found
No related tags found
1 merge request!32Expand type support
...@@ -102,10 +102,6 @@ PLOTTING_METHODS = [ ...@@ -102,10 +102,6 @@ PLOTTING_METHODS = [
] ]
def _convert_matplotlib_scale(scale: str) -> Scale:
return "scale"
def is_array_like(x): def is_array_like(x):
try: try:
np.array(x) np.array(x)
...@@ -639,7 +635,7 @@ class _AxesProxy(Proxy[MplAxes]): ...@@ -639,7 +635,7 @@ class _AxesProxy(Proxy[MplAxes]):
else: else:
self._plot.spines_removed.append(spine) self._plot.spines_removed.append(spine)
xlabel = self.delegate.get_xlabel() xlabel = self.delegate.get_xlabel()
xscale = _convert_matplotlib_scale(self.delegate.get_xscale()) xscale = self.delegate.get_xscale()
self._plot.x_axis.label = xlabel self._plot.x_axis.label = xlabel
self._plot.x_axis.scale = xscale self._plot.x_axis.scale = xscale
...@@ -647,7 +643,7 @@ class _AxesProxy(Proxy[MplAxes]): ...@@ -647,7 +643,7 @@ class _AxesProxy(Proxy[MplAxes]):
self._plot.x_axis.limit = self.delegate.get_xlim() self._plot.x_axis.limit = self.delegate.get_xlim()
ylabel = self.delegate.get_ylabel() ylabel = self.delegate.get_ylabel()
yscale = _convert_matplotlib_scale(self.delegate.get_yscale()) yscale = self.delegate.get_yscale()
if not self.delegate.get_autoscaley_on(): if not self.delegate.get_autoscaley_on():
self._plot.y_axis.limit = self.delegate.get_ylim() self._plot.y_axis.limit = self.delegate.get_ylim()
...@@ -843,8 +839,8 @@ class _AxesProxy3D(Proxy[MplAxes3D]): ...@@ -843,8 +839,8 @@ class _AxesProxy3D(Proxy[MplAxes3D]):
traces.append( traces.append(
SurfaceTrace3D( SurfaceTrace3D(
type="surface3D", type="surface3D",
length=length, _length=length,
width=width, _width=width,
label=label, label=label,
datapoints=datapoints, datapoints=datapoints,
) )
...@@ -879,7 +875,7 @@ class _AxesProxy3D(Proxy[MplAxes3D]): ...@@ -879,7 +875,7 @@ class _AxesProxy3D(Proxy[MplAxes3D]):
if isinstance(self._plot, Plot3D): if isinstance(self._plot, Plot3D):
xlabel = self.delegate.get_xlabel() xlabel = self.delegate.get_xlabel()
xscale = _convert_matplotlib_scale(self.delegate.get_xscale()) xscale = self.delegate.get_xscale()
self._plot.x_axis.label = xlabel self._plot.x_axis.label = xlabel
self._plot.x_axis.scale = xscale self._plot.x_axis.scale = xscale
...@@ -887,7 +883,7 @@ class _AxesProxy3D(Proxy[MplAxes3D]): ...@@ -887,7 +883,7 @@ class _AxesProxy3D(Proxy[MplAxes3D]):
self._plot.x_axis.limit = self.delegate.get_xlim() self._plot.x_axis.limit = self.delegate.get_xlim()
ylabel = self.delegate.get_ylabel() ylabel = self.delegate.get_ylabel()
yscale = _convert_matplotlib_scale(self.delegate.get_yscale()) yscale = self.delegate.get_yscale()
self._plot.y_axis.label = ylabel self._plot.y_axis.label = ylabel
self._plot.y_axis.scale = yscale self._plot.y_axis.scale = yscale
...@@ -895,7 +891,7 @@ class _AxesProxy3D(Proxy[MplAxes3D]): ...@@ -895,7 +891,7 @@ class _AxesProxy3D(Proxy[MplAxes3D]):
self._plot.y_axis.limit = self.delegate.get_ylim() self._plot.y_axis.limit = self.delegate.get_ylim()
zlabel = self.delegate.get_zlabel() zlabel = self.delegate.get_zlabel()
zscale = _convert_matplotlib_scale(self.delegate.get_zscale()) zscale = self.delegate.get_zscale()
self._plot.z_axis.label = zlabel self._plot.z_axis.label = zlabel
self._plot.z_axis.scale = zscale self._plot.z_axis.scale = zscale
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment