Skip to content

Remove deprecated argument of pyplot.stem#6086

Merged
pavoljuhas merged 2 commits intoquantumlib:masterfrom
pavoljuhas:notebook-tweaks
May 8, 2023
Merged

Remove deprecated argument of pyplot.stem#6086
pavoljuhas merged 2 commits intoquantumlib:masterfrom
pavoljuhas:notebook-tweaks

Conversation

@pavoljuhas
Copy link
Copy Markdown
Collaborator

use_line_collection is deprecated and defaults to True anyway.
Prevent deprecation messages from showing up at
https://quantumai.google/cirq/experiments/fourier_checking

`use_line_collection` is deprecated and defaults to `True` anyway.
Prevent deprecation messages from showing up at
https://quantumai.google/cirq/experiments/fourier_checking
@pavoljuhas pavoljuhas requested review from a team, cduck and vtomole as code owners May 4, 2023 20:05
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pavoljuhas
Copy link
Copy Markdown
Collaborator Author

Requires #6087 to pass the CI.

@CirqBot CirqBot added the Size: XS <10 lines changed label May 6, 2023
Copy link
Copy Markdown
Collaborator

@viathor viathor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's what I've found:

  1. use_line_collection used to default to False. The default changed to True in matplotlib 3.3.0, see release notes.
  2. use_line_collection is deprecated since matplotlib 3.6.0, see documentation.
  3. We depend on matplotlib ~3.0, see requirements.txt.

Perhaps we should upgrade matplotlib dependency first?

@pavoljuhas
Copy link
Copy Markdown
Collaborator Author

Perhaps we should upgrade matplotlib dependency first?

Thank you for careful checking. The return value from the touched stem calls is not used.
IIUC, use_line_collection affects only the return type and a plotting performance,
but the resulting plots should look the same.
As such, I don't think it is necessary to change the matplotlib requirement.

Copy link
Copy Markdown
Collaborator

@viathor viathor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Thank you!

@pavoljuhas pavoljuhas merged commit df3acbe into quantumlib:master May 8, 2023
@pavoljuhas pavoljuhas deleted the notebook-tweaks branch May 8, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants