avoid ignoring ticks set by the user

This commit is contained in:
Daniel Schwabeneder 2017-03-13 16:05:30 +01:00 committed by GitHub
parent f2235abf08
commit 76e1f4720b

View File

@ -159,7 +159,7 @@ function optimal_ticks_and_labels(axis::Axis, ticks = nothing)
# If the axis input was a Date or DateTime use a special logic to find
# "round" Date(Time)s as ticks
# TODO: maybe: non-trivial scale (:ln, :log2, :log10) for date/datetime
if axis[:formatter] in (dateformatter, datetimeformatter) && scale == :identity
if axis[:formatter] in (dateformatter, datetimeformatter) && ticks == nothing && scale == :identity
return optimize_datetime_ticks(amin, amax; k_min = 2, k_max = 4)
end