Plots.jl: Tick Format

Created on 26 Jul 2016  Â·  5Comments  Â·  Source: JuliaPlots/Plots.jl

Is there anyway to specify the tick format. I have data that goes from 0-1e15 and I would like the ticks to use scientific notation.

screenshot from 2016-07-25 17-43-31

Most helpful comment

Trying this out:

using Plots; pyplot()
plot(1e6randn(100), yformatter = :scientific)

tmp

plot(1e6randn(100), yformatter = yi -> "my custom label: $yi")

tmp

Only on julia 0.5 and Plots dev branch

All 5 comments

This is something I've been thinking about. For my purpose I have a
TimeOfDay type which is like a number but I'd like to have special
formatting. I'm thinking maybe a 'tick_formatter' attribute that is a
function (or functor) and defaults to 'string'.

On Monday, July 25, 2016, Luke Stagner [email protected] wrote:

Is there anyway to specify the tick format. I have data that goes from
0-1e15 and I would like the ticks to use scientific notation.

[image: screenshot from 2016-07-25 17-43-31]
https://cloud.githubusercontent.com/assets/4305891/17122330/5b36739a-528f-11e6-81fd-981d3b4ed6ac.png

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tbreloff/Plots.jl/issues/413, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA492kmbR2ZIQ-BNJCHL5yOq2auaZ8Afks5qZVh5gaJpZM4JUrwm
.

Trying this out:

using Plots; pyplot()
plot(1e6randn(100), yformatter = :scientific)

tmp

plot(1e6randn(100), yformatter = yi -> "my custom label: $yi")

tmp

Only on julia 0.5 and Plots dev branch

I just had the reverse problem, and it seems there's no option to override the automatic scientific notation. According to the docs options are only :scientific or :auto. Could we add an option for standard formatting? Maybe it could be called :none or :nonscientific.

Sounds reasonable. Could you open a fresh issue?

Sorry I lost track of this, just opened a new issue: #1840

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pkofod picture pkofod  Â·  3Comments

dancsi picture dancsi  Â·  4Comments

mkborregaard picture mkborregaard  Â·  3Comments

tbenst picture tbenst  Â·  3Comments

asinghvi17 picture asinghvi17  Â·  3Comments