Skip to content
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

Guide.ytick should accept a range #1293

Closed
cmcaine opened this issue Jul 1, 2019 · 2 comments · Fixed by #1295
Closed

Guide.ytick should accept a range #1293

cmcaine opened this issue Jul 1, 2019 · 2 comments · Fixed by #1295

Comments

@cmcaine
Copy link
Contributor

cmcaine commented Jul 1, 2019

using Statistics
using Gadfly

plot(
    y=1:15|> cumsum,
    Geom.line, 
    Guide.yticks(ticks = 0:25:100 |> collect))

It would be nice not to have to collect the ticks myself.

In my testing adding this constructor is sufficient:

Yticks(label, ticks::AbstractRange, orientation) =
    Yticks(label, collect(ticks), orientation)
@tlnagy
Copy link
Member

tlnagy commented Jul 1, 2019

Agreed. This would be really nice to add, I often forget to collect ticks as well. Do you mind submitting a PR with this change? Also, could you fix it for XTicks as well?

cmcaine added a commit to cmcaine/Gadfly.jl that referenced this issue Jul 2, 2019
@cmcaine
Copy link
Contributor Author

cmcaine commented Jul 2, 2019

PR submitted.

cmcaine added a commit to cmcaine/Gadfly.jl that referenced this issue Jul 9, 2019
bjarthur pushed a commit that referenced this issue Jul 15, 2019
* Support AbstractVectors as NumericalAesthetics

Fixes #1293.

* Use ranges in docs

* Update NEWS.md

* Test ranges work for xyticks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants