Skip to content

Drawing only one contour #866

Closed
Closed
@JoyMonteiro

Description

@JoyMonteiro

Hello,

I was trying to draw only a single contour by passing levels=[0], and nothing gets
plotted.

I checked utils.py, and the logic used to calculate n_colors in _build_discrete_cmap
gives n_colors=0, since it will first set extend to 'neither', and so ext_n = 0, and
n_colors = len(levels) + ext_n - 1

I'm not sure, but this might be the issue.

Another issue, which might be unrelated, is when I'm trying to draw two contours. It plots only
one contour, and it will plot two contours only if I set norm=None.

Any suggestions?

TIA,
Joy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions