Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions polaris/viz/planar.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ def plot_horiz_field(ds_mesh, field, out_file_name=None, # noqa: C901
The title of the plot

vmin : float, optional
The minimum values for the colorbar
The minimum values for the colorbar; if provided, must be positive if
``cmap_scale == 'log'``

vmax : float, optional
The maximum values for the colorbar
The maximum values for the colorbar; if provided, must be positive if
``cmap_scale == 'log'``

show_patch_edges : boolean, optional
If true, patches will be plotted with visible edges
Expand Down Expand Up @@ -165,8 +167,10 @@ def plot_horiz_field(ds_mesh, field, out_file_name=None, # noqa: C901

if cmap_scale == 'log':
pcolor_kwargs['norm'] = LogNorm(
vmin=max(1e-10, vmin), vmax=vmax, clip=False
vmin=vmin, vmax=vmax, clip=False
)
pcolor_kwargs.pop('vmin', None)
pcolor_kwargs.pop('vmax', None)

if figsize is None:
width = ds_mesh.xCell.max() - ds_mesh.xCell.min()
Expand Down
Loading