Why tickvals/ticktext is not showing on x-axis in population pyramid graph
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Creating instance of the figure
fig = gp.Figure()
Adding Male data to the figure
fig.add_trace(gp.Bar(y= y_age, x = x_M,
name = 'Male', orientation = 'h'))
Adding Female data to the figure
fig.add_trace(gp.Bar(y = y_age, x = x_F,
name = 'Female', orientation = 'h'))
Updating the layout for our graph
fig.update_layout(title = 'Population Pyramid of Registration Data',
title_font_size = 22, barmode = 'relative',
bargap = 0.6, bargroupgap = 0,
xaxis = dict(tickvals = [-1000, -800, -600, -400, -200, 0, 200, 400, 600, 800, 1000],
ticktext = ['10H', '8H', '6H', '4H', '2H',
'0', '2H', '4H', '6H', '8H', '10H'],
title = 'Population in Hundreds',
title_font_size = 12)
)
fig.show()
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
Reproduce the issue with the supplied R population-pyramid example, especially the xaxis tickvals and ticktext settings, and inspect the behavior around fig.show(). Confirm whether the configured labels appear on the x-axis; done means the example renders the requested tick labels correctly or documents the limitation and its cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100
