File "/tmp/ipykernel_8039/2786353714.py", line 32, in save_plot
obj.save("westeros_report.pdf", verbose=False)
sv = self.save_helper(
^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/ggplot.py", line 610, in save_helper
figure = self.draw(show=False)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/ggplot.py", line 279, in draw
self._draw_layers()
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/ggplot.py", line 442, in _draw_layers
self.layers.draw(self.layout, self.coordinates)
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/layer.py", line 459, in draw
l.draw(layout, coord)
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/layer.py", line 367, in draw
self.geom.draw_layer(self.data, layout, coord, **params)
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/geoms/geom.py", line 289, in draw_layer
self.draw_panel(pdata, panel_params, coord, ax, **params)
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/geoms/geom_path.py", line 148, in draw_panel
self.draw_group(gdata, panel_params, coord, ax, **params)
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/geoms/geom_path.py", line 158, in draw_group
data = coord.transform(data, panel_params, munch=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/coords/coord_cartesian.py", line 61, in transform
return transform_position(data, squish_infinite_x, squish_infinite_y)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/positions/position.py", line 127, in transform_position
data[xs] = data[xs].apply(trans_x)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/frame.py", line 10034, in apply
return op.apply().__finalize__(self, method="apply")
^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/apply.py", line 837, in apply
return self.apply_standard()
^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/apply.py", line 965, in apply_standard
results, res_index = self.apply_series_generator()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/apply.py", line 981, in apply_series_generator
results[i] = self.func(v, *self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/plotnine/coords/coord_cartesian.py", line 56, in squish_infinite_x
return squish_infinite(col, range=panel_params.x.range)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/mizani/bounds.py", line 242, in squish_infinite
_x[np.isneginf(_x)] = range[0]
~~^^^^^^^^^^^^^^^^^
ValueError: assignment destination is read-only
So I realize this issue is about a migration that mizani may have to make in the future, but at the moment it prevents simultaneous use of plotnine and dask[dataframe].
We will try to hack up a work-around (maybe forcibly disable copy-on-write just before a call to plotnine.ggplot.save()?) but wanted to give a heads-up.