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

swap x/y formatters for vline #2170

Merged
merged 1 commit into from
Sep 4, 2019
Merged

swap x/y formatters for vline #2170

merged 1 commit into from
Sep 4, 2019

Conversation

daschw
Copy link
Member

@daschw daschw commented Sep 1, 2019

vline uses y input and applies it to the x axis. This messes up the axis formatter for type recipes (cf #1762). This is a somewhat hacky workaround, but I think a special case for vline can be justified.

using Plots, Dates
plot(DateTime(2018):Day(1):DateTime(2019), cumsum(randn(366)))
vline!([DateTime(2018, 6)])

vline1

User-defined formatters still match the correct axis:

plot(rand(10))
vline!([4], yformatter = :scientific)

vline2

Closes #1762 and closes #1914.

@daschw daschw merged commit 4cb3e6a into JuliaPlots:master Sep 4, 2019
@crbinz
Copy link

crbinz commented Sep 5, 2019

Any chance we can get a maintenance release for this? I have a long-standing issue in my own code that has been blocked by this and I'd love to close it out :)

@daschw
Copy link
Member Author

daschw commented Sep 6, 2019

Sure thing JuliaRegistries/General#3317

@daschw daschw deleted the vline branch October 13, 2019 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vline plot of dates produces strange yticks vline! is broken on time axes
2 participants