8000 Specifying dictionary argument with dict() or braces matters in set_bbox · Issue #1934 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Specifying dictionary argument with dict() or braces matters in set_bbox #1934
Closed
@lguez

Description

@lguez

In matplotlib home page, there is a link to a tutorial by Nicolas Rougier. In the section of the tutorial entitled "Devil is in the details", the script:

http://www.loria.fr/~rougier/teaching/matplotlib/scripts/exercice_10.py

produces the figure displayed on the web page. Line 48 of the script is:

label.set_bbox(dict(facecolor='white', edgecolor='None', alpha=0.65 ))

If we replace this line by:

label.set_bbox({"facecolor": "white", "edgecolor": "None","alpha":0.65})

then the edgecolor request is not taken into account. The two statements above should be equivalent. The author of the tutorial, Nicolas Rougier, is surprised too. People on stackoverflow think it is a matplotlib bug:

http://stackoverflow.com/questions/16107832/specifying-dictionary-argument-with-dict-or-braces-matters-in-set-bbox

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0