-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Creating a line plot with x_axis_type='log'
fails when x_max < 1
#5389
Comments
Did this PR get into the Here is a demo of what I am seeing:
|
Just realized this PR likely did not get into the |
This was not in |
@StevenCHowell from my testings: the original example now works. However, there seems to be problems with data values < 0 as best I can tell. |
i.e. this works:
But this is blank:
ping @clairetang6 Given that the OP code seems to work, I guess I'd be more in favor of a new issue at this point. But thoughts welcome |
This looks good. It can be a separate issue. Thanks @clairetang6 and @bryevdv, this was a big step in making bokeh easier to use for my data (sorry I never actually helped fix anything rather than only criticizing). |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When creating a plot with a logarithmic scale on the x-axis, if the maximum x-value is less than 1 the x-axis decreases from left to right, the scale is linear, not logarithmic, and the default view does not show the data. I tested various values for the maximum x-value and found that when x_max > 1, the x-axis increases left to right but the default view only shows x > 1. This code demonstrates the problem
I tried declaring the x_range for the figure using
x_range=(x.min(), x.max())
but this had to effect unless I removed the zero point from the data, i.e.,x = x[x > 0]
. With theses changes, the x-axis increases left to right and the default view shows the range indicated. Here is a functional workaroundI did not test all these same conditions with
y_axis_type
but I expect it to have the same problems. I did notice that the default view only showsy > 1
, even if the data begins ayy < 1
.Here are the key points that need to be verified for logarithmic x and y axes:
The text was updated successfully, but these errors were encountered: