Skip to content

Vertical Alignment for Annotations [Feature Request] #1545

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

Closed
stoberblog opened this issue Apr 1, 2017 · 3 comments
Closed

Vertical Alignment for Annotations [Feature Request] #1545

stoberblog opened this issue Apr 1, 2017 · 3 comments

Comments

@stoberblog
Copy link

I'm trying to add two annotations to a plot, one in top center, the other bottom center. The problem is, I'd like these to stay visible when I zoom in, so using a static y co-ordinate won't work.

I'm using a scatter plot, and the data I'm plotting is power factor in degrees, where a positive value indicates a capacitive load, and a negative angle represents an inductive load.
plotly-powerfactor

So I propose a feature request to add a parameter called valign (similar to align for the horizontal axis), which allows the text to stay in the same relative vertical location, regardless of scaling or zoom. I'd suggest values of: 'top', 'center', 'bottom', 'positive', 'negative'. The positive and negative can be used to have a label on a certain side of the y=0 line or similar.

Thanks

@etpinard
Copy link
Contributor

etpinard commented Apr 3, 2017

If I understand your request correctly, you can already do this using xref: 'paper' see http://codepen.io/etpinard/pen/WpmNEo for an example.

@etpinard
Copy link
Contributor

etpinard commented Apr 5, 2017

@stoberblog maybe #1551 will do just what you want.

@alexcjohnson
Copy link
Collaborator

doesn't look like #1551 to me, I'm fairly sure @etpinard 's first thought about setting xref and/or yref to 'paper' (with appropriate x / y values) is what you're looking for. If you want to get really precise with positioning, xanchor and yanchor can also help.

I'm going to close this, but @stoberblog feel free to reopen if we've missed what you're going for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants