Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matplotlylib fixes #3143

Open
wants to merge 2 commits into
base: master
from
Open

Matplotlylib fixes #3143

wants to merge 2 commits into from

Conversation

@fdion
Copy link

@fdion fdion commented Apr 9, 2021

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

This PR fixes compatibility of matplotlylib with matplotib 3.3 and above and specifically tested with the latest release (3.4.1). Before fixing the compatibility, I fixed any matplotlylib tests that were not passing. Then I fixed the code.

Specifically, this addresses changes to matplotlib:

  • axis._gridOnMajor moved
  • spine.is_frame_like() deprecated
  • FuncFormatter instead of FixedFormatter
  • changes in dash patterns
  • number of points for bounding boxes

It also renders the shapes for the matplotib legend (previously, only the text would display in a legend). This is mainly done through the method draw_legend_shapes which is called by draw_marked_line and handles lines, markers and lines+markers. It doesn't handle the legend bounding box.

Tested with matplotlib 3.2,2 (last known working with matplotlylib, with warnings) and 3.4.1 (current), from notebooks with various charts / markers. Also tested with hotelling package with `matplotlib 3.4.1.
newplot(1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant