Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Draft PR: On adding data tooltip support (#23378)#30133
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
Dil003 wants to merge1 commit intomatplotlib:mainChoose a base branch fromebubekir-pulat:data-tooltip-support
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+280 −0
Open
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
22 changes: 22 additions & 0 deletionslib/matplotlib/artist.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletionslib/matplotlib/axes/_axes.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletionslib/matplotlib/backend_bases.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletionslib/matplotlib/backends/backend_qt.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletionslib/matplotlib/figure.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletionstest_tooltip.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# # ## Check if your tooltip data is being stored | ||
# # import matplotlib.pyplot as plt | ||
# # import numpy as np | ||
# # # Test if tooltip is being stored | ||
# # x = np.linspace(0, 10, 5) | ||
# # y = np.sin(x) | ||
# # line, = plt.plot(x, y, 'o-', tooltip=['Point A', 'Point B', 'Point C', 'Point D', 'Point E']) | ||
# # # Check if tooltip was stored | ||
# # print("Tooltip stored:", line.get_tooltip()) | ||
# # print("Line has tooltip method:", hasattr(line, 'get_tooltip')) | ||
# # # Not showing the plot yet, just testing the storage | ||
# ## Test the backend | ||
# import matplotlib.pyplot as plt | ||
# import matplotlib | ||
# import numpy as np | ||
# print("Backend:", matplotlib.get_backend()) | ||
# # Test with a simple plot and try hovering | ||
# x = np.linspace(0, 10, 5) | ||
# y = np.sin(x) | ||
# fig, ax = plt.subplots() | ||
# line, = ax.plot(x, y, 'o-', tooltip=['Point A', 'Point B', 'Point C', 'Point D', 'Point E'], picker=5) | ||
# print("Tooltip stored:", line.get_tooltip()) | ||
# print("Figure has tooltip handling:", hasattr(fig, '_on_mouse_move_for_tooltip')) | ||
# # Test if canvas has tooltip methods | ||
# print("Canvas has show_tooltip:", hasattr(fig.canvas, 'show_tooltip')) | ||
# print("Canvas has hide_tooltip:", hasattr(fig.canvas, 'hide_tooltip')) | ||
# plt.title('Try hovering over the points') | ||
# plt.show() | ||
# import matplotlib.pyplot as plt | ||
# import numpy as np | ||
# # Test tooltips with console output | ||
# x = np.linspace(0, 10, 5) | ||
# y = np.sin(x) | ||
# plt.figure() | ||
# plt.plot(x, y, 'o-', tooltip=['Point A', 'Point B', 'Point C', 'Point D', 'Point E']) | ||
# plt.title('Move mouse over points - check console for tooltip messages') | ||
# plt.show() |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.