# How do I use Guide.yticks() with a log scale?

3 messages
Open this post in threaded view
|
Report Content as Inappropriate

## How do I use Guide.yticks() with a log scale?

 When I plot the DataFrame below using Scale.y_log10 the y-axis has ticks for half powers of 10 (e.g. 10^5.5).  The plot is correct, but it's weird seeing half powers of 10 on a log plot.If I add Guide.yticks(ticks=ymarks) with the following values`ymarks=[10^4,10^5,10^6,10^7]`I get a plot with the y-axis running up to 10^10000000.How can I get rid of the half powers of 10 on the y-axis ticks?`9×2 DataFrames.DataFrame│ Row │ x     │ y       │├─────┼───────┼─────────┤│ 1   │ 5000  │ 35950   ││ 2   │ 10000 │ 71961   ││ 3   │ 15000 │ 108145  ││ 4   │ 20000 │ 154528  ││ 5   │ 24000 │ 395218  ││ 6   │ 28000 │ 689465  ││ 7   │ 32000 │ 2646407 ││ 8   │ 36000 │ 3138533 ││ 9   │ 40000 │ 8648694 │ymarks=[10^4,10^5,10^6,10^7]plot(df, x="x",y="y",Scale.y_log10, Guide.yticks(ticks=ymarks) )`
Open this post in threaded view
|
Report Content as Inappropriate

## Re: How do I use Guide.yticks() with a log scale?

 Try posting your question/concern here:  discussing Plots.jlOn Monday, October 24, 2016 at 4:14:45 PM UTC-4, Dean Schulze wrote:When I plot the DataFrame below using Scale.y_log10 the y-axis has ticks for half powers of 10 (e.g. 10^5.5).  The plot is correct, but it's weird seeing half powers of 10 on a log plot.If I add Guide.yticks(ticks=ymarks) with the following values`ymarks=[10^4,10^5,10^6,10^7]`I get a plot with the y-axis running up to 10^10000000.How can I get rid of the half powers of 10 on the y-axis ticks?`9×2 DataFrames.DataFrame│ Row │ x     │ y       │├─────┼───────┼─────────┤│ 1   │ 5000  │ 35950   ││ 2   │ 10000 │ 71961   ││ 3   │ 15000 │ 108145  ││ 4   │ 20000 │ 154528  ││ 5   │ 24000 │ 395218  ││ 6   │ 28000 │ 689465  ││ 7   │ 32000 │ 2646407 ││ 8   │ 36000 │ 3138533 ││ 9   │ 40000 │ 8648694 │ymarks=[10^4,10^5,10^6,10^7]plot(df, x="x",y="y",Scale.y_log10, Guide.yticks(ticks=ymarks) )`
 Well, only if you'd like to switch your workflow to Plots... (Though the OP should consider it, this question was asking about Gadfly)To answer... Gadfly expects the exponent when setting the ticks manually, not the actual value. On Wednesday, November 2, 2016, Jeffrey Sarnoff <[hidden email]> wrote:Try posting your question/concern here:  discussing Plots.jlOn Monday, October 24, 2016 at 4:14:45 PM UTC-4, Dean Schulze wrote:When I plot the DataFrame below using Scale.y_log10 the y-axis has ticks for half powers of 10 (e.g. 10^5.5).  The plot is correct, but it's weird seeing half powers of 10 on a log plot.If I add Guide.yticks(ticks=ymarks) with the following values`ymarks=[10^4,10^5,10^6,10^7]`I get a plot with the y-axis running up to 10^10000000.How can I get rid of the half powers of 10 on the y-axis ticks?`9×2 DataFrames.DataFrame│ Row │ x     │ y       │├─────┼───────┼─────────┤│ 1   │ 5000  │ 35950   ││ 2   │ 10000 │ 71961   ││ 3   │ 15000 │ 108145  ││ 4   │ 20000 │ 154528  ││ 5   │ 24000 │ 395218  ││ 6   │ 28000 │ 689465  ││ 7   │ 32000 │ 2646407 ││ 8   │ 36000 │ 3138533 ││ 9   │ 40000 │ 8648694 │ymarks=[10^4,10^5,10^6,10^7]plot(df, x="x",y="y",Scale.y_log10, Guide.yticks(ticks=ymarks) )`