-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
ENH: Expose symlog scaling in plotting API #24867
Labels
Visualization
plotting
Milestone
Comments
We probably wouldn't make it the default, unless matplotlib did as well.
A PR allowing 'sym' for logx, logy, and loglog seems fine.
…On Mon, Jan 21, 2019 at 2:04 PM Michael Ekstrand ***@***.***> wrote:
The default log-scaled axes, activated by the logx, logy, and loglog
methods to the Pandas plotting API, do the straightforward thing and take
the log of 0 values. It then attempt to plot with these infinite logs, and
makes the entire plot unusable without warning in the presence of 0s.
Matplotlib provides another scale, the symlog scale, that makes a small
region near 0 linear to avoid these problems. For quick-and-dirty 'look at
my data on a log axis' plotting, symlog is significantly more useful.
I can access it like this:
``
dfp = nh_stat_df.plot(kind='scatter', x='nhelpful', y='count')
dfp.set_xscale('symlog')
dfp.set_yscale('symlog')
dfp
Either making the `symlog` scale the default log scale for plotting, or supporting a `loglog='sym'` option, would make it significantly easier to do quick data inspection with Pandas' convenience plotting.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#24867>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIo11veYq_-C7dTx_0QVZHArxnFggks5vFh1GgaJpZM4aLc9p>
.
|
@mdekstrand can you edit your post to include a minimal example? http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports. That way it'll be obvious when this can be closed. |
4 tasks
@TomAugspurger done! |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default log-scaled axes, activated by the
logx
,logy
, andloglog
methods to the Pandas plotting API, do the straightforward thing and take the log of 0 values. It then attempt to plot with these infinite logs, and makes the entire plot unusable without warning in the presence of 0s.For example:
Matplotlib provides another scale, the
symlog
scale, that makes a small region near 0 linear to avoid these problems. For quick-and-dirty 'look at my data on a log axis' plotting,symlog
is significantly more useful.I can access it like this:
Either making the
symlog
scale the default log scale for plotting, or supporting aloglog='sym'
option, would make it significantly easier to do quick data inspection with Pandas' convenience plotting.The text was updated successfully, but these errors were encountered: