镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[BUG]: contour.showlegend default differs from actual behavior #8111

Open

Description

@Lexachoc

Description

The contour.showlegend reference documents the default as true.

However, for contours with coloring !== 'none', the actual default is explicitly set to false in:

if(coloring !== 'none') {
// plots/plots always coerces showlegend to true, but in this case
// we default to false and (by default) show a colorbar instead
if(traceIn.showlegend !== true) traceOut.showlegend = false;
traceOut._dfltShowLegend = false;
colorscaleDefaults(
traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'}
);
}

So the documented default does not match the actual behavior. Or this is confusing.

Screenshot

Image

Codepen

https://codepen.io/Lexachoc/pen/WbpdLjQ

Activity

  1. changed the title [-][BUG]: `contour.showlegend` default is incorrectly documented as `true`[/-] [+][BUG]: `contour.showlegend` default differs from actual behavior[/+] on Oct 9, 2026
  2. camdecoster commented on Oct 13, 2026

    @camdecoster
    Contributor

    Thanks for letting us know! It looks like we're using a default version of the attribute description for this trace, but it needs more nuance. Would you like to update the attribute description to include this specific case?

  3. added
    P2considered for next cycle
    and removed
    bugsomething broken
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions