You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's happening is that the annotation is being drawn in linear units - it isn't truly referenced to the yaxis, because if you read across, the y-value for the annotation is 10E3, not 3.
This might be a problem to fix, given that it would be backward-incompatible - see #420.
If so, please at least consider warning about this issue at: https://plotly.com/javascript/text-and-annotations/
A suitable message might be:
Note, for backward compatibility, annotations are drawn in linear units. So if your axis-type is log, remember to use:
yref:y, y:Math.log10(your_y_value)
Thanks :-)
The text was updated successfully, but these errors were encountered:
You're exactly right @RichardNeill - an unfortunate decision very early in the history of plotly.js 😅
@LiamConnors thoughts on how best to warn people about this? We do already mention this in the description for x and y, but you'll only see that if you look carefully at the reference for these attributes:
If I have:
then the annotation is attached to the point, as expected.
But If I then make the y-axis have type=log, then the annotation comes adrift from the point.
https://codepen.io/RichardNeill/pen/dyreyMG
What's happening is that the annotation is being drawn in linear units - it isn't truly referenced to the yaxis, because if you read across, the y-value for the annotation is 10E3, not 3.
This might be a problem to fix, given that it would be backward-incompatible - see #420.
If so, please at least consider warning about this issue at: https://plotly.com/javascript/text-and-annotations/
A suitable message might be:
Note, for backward compatibility, annotations are drawn in linear units. So if your axis-type is log, remember to use:
yref:y, y:Math.log10(your_y_value)
Thanks :-)
The text was updated successfully, but these errors were encountered: