Skip to content

Commit 47d6654

Browse files
committed
Fix planar plots with log norm
We can't pass `vmin` and `vmax` along with `norm` that also tried to define the min and max: ``` ValueError: Passing a Normalize instance simultaneously with vmin/vmax is not supported. Please pass vmin/vmax directly to the norm when creating it. ```
1 parent a1a8519 commit 47d6654

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

polaris/viz/planar.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ def plot_horiz_field(ds_mesh, field, out_file_name=None, # noqa: C901
167167
pcolor_kwargs['norm'] = LogNorm(
168168
vmin=max(1e-10, vmin), vmax=vmax, clip=False
169169
)
170+
pcolor_kwargs.pop('vmin', None)
171+
pcolor_kwargs.pop('vmax', None)
170172

171173
if figsize is None:
172174
width = ds_mesh.xCell.max() - ds_mesh.xCell.min()

0 commit comments

Comments
 (0)