Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showticklabels=false and title_standoff not None moves xaxis-title to top #6552

Open
kvanderwijst opened this issue Dec 14, 2020 · 8 comments
Labels
bug something broken P3 backlog

Comments

@kvanderwijst
Copy link

Very strange indeed.

fig = go.Figure()
fig.add_scatter(x=[1,2,3],y=[5,6,7])
fig.update_xaxes(title='Test', title_standoff=0, showticklabels=False)

produces:
image

@DrJohnWagner
Copy link

I ran into the same problem. But it only occurs for the x axis. Not the y axis.

@nnansters
Copy link

Running into this as well. I don't think the title_standoff is required to replicate this however, just the showticklabels=False already does the trick here.

@alexcjohnson alexcjohnson transferred this issue from plotly/plotly.py Apr 5, 2023
@alexcjohnson
Copy link
Collaborator

Moved to the plotly.js repo, which is where the fix will need to be. My guess is the fact that it now reproduces without explicit standoff is due to #6428 but its origin is clearly much before that.

@nnansters
Copy link

Thanks for checking in on this @alexcjohnson. Let me know if you need any more information to reproduce.

@divyamadhav
Copy link

I ran into the this problem even without setting title standoff

@nicolocarissimi
Copy link

Is there any way to prevent this (e.g. with an older plotly version)?

@d-s-t
Copy link

d-s-t commented Jul 28, 2023

W/A that work for me was to set the color of the ticktext to transparent.
fig.update_xaxes(tickfont=dict(color="rgba(0,0,0,0)"))

@Viech
Copy link

Viech commented Jan 14, 2024

W/A that work for me was to set the color of the ticktext to transparent. fig.update_xaxes(tickfont=dict(color="rgba(0,0,0,0)"))

One can additionally set a size to shrink the invisible ticks: tickfont=dict(color="rgba(0,0,0,0)", size=1).
This still moves the title down a bit compared to before, which can possibly be counteracted with standoff if that's not already set to zero.

@gvwilson gvwilson self-assigned this Jul 12, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 backlog label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

9 participants