Skip to content

WIP: Add support to edit subplot configurations via textbox#19271

Closed
aitikgupta wants to merge 2 commits intomatplotlib:mainfrom
aitikgupta:widget-textbox
Closed

WIP: Add support to edit subplot configurations via textbox#19271
aitikgupta wants to merge 2 commits intomatplotlib:mainfrom
aitikgupta:widget-textbox

Conversation

@aitikgupta
Copy link
Contributor

@aitikgupta aitikgupta commented Jan 10, 2021

PR Summary

This PR adds support to manually edit the slider values in the subplot configuration tool via a TextBox.
(potentially a NumericTextBox)
This is a WIP, to mockup the desired behavior mentioned at #19257 (comment).

Behaviour:

To test it out, you can use any snippet:

import matplotlib.pyplot as plt


def example_plot(ax, fontsize=12):
    ax.plot([1, 2])
    ax.set_xlabel('x-label', fontsize=fontsize)
    ax.set_ylabel('y-label', fontsize=fontsize)
    ax.set_title('Title', fontsize=fontsize)

fig, axis = plt.subplots()
example_plot(axis, fontsize=24)
plt.show()

A partial fix to #19257

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@timhoffm timhoffm marked this pull request as draft January 11, 2021 00:41
@timhoffm
Copy link
Member

@aitikgupta I've converted this to "draft". This signals reviewers that they don't yet have to look at it. When you think this is ready for a closer look (doesn't have to be 100% completed), you can click the "Ready for review" button. And of course, ping us whenever there is a question.

@ianhi
Copy link
Contributor

ianhi commented Jan 11, 2021

Closes #19257

We may have talked past eachother a little bit. In that issue I was proposing that this be a feature intrinsic to all sliders, not just the ones in the subplots adjust panel. So this may well be a valuable addition, but it shouldn't close that issue.

Of course if this was implemented for every slider then you would get it for free in the subplot panel.

@aitikgupta
Copy link
Contributor Author

I was proposing that this be a feature intrinsic to all sliders

That actually makes more sense! Ah, that's why you were talking about valtext property over that issue.
I will revamp this (good thing this PR is a draft)

@github-actions
Copy link

Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it.

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Sep 27, 2023
@timhoffm
Copy link
Member

Closing for lack of activity. Subplot configuration via GUI is anyway a quite rare use case.

@timhoffm timhoffm closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: inactive Marked by the “Stale” Github Action status: needs rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants