Center Title by default for px.imshow
Open
Beginner friendly
Nobody has claimed this yet.
feature
P3
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
Issue:
Many chart-making functions such as px.line, px.scatter, px.bar center the title by default (desired), but the px.imshow function displays the title on the left margin instead (not desired).
import plotly.express as px
fig = px.imshow(mat, title="My Title")
Current Workaround:
fig.update_layout(title={'text': "My Title", 'x':0.485, 'xanchor': 'center'}) # manually center the title
Proposed Solution:
The px.imshow function should center the title by default.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the px.imshow entry point linked in the issue and compare its title handling with px.line, px.scatter, and px.bar. Check the existing tests for Plotly Express image figures, then update coverage so a title is centered by default and verify that the expected layout is produced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100