plotly / plotly/plotly.py

Center Title by default for px.imshow

Open Beginner friendly
#4,303 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.