Skip to content

Conversation

@rossviljoen
Copy link
Collaborator

@rossviljoen rossviljoen commented Jul 20, 2025

This PR does two things for the MakieExt:

  1. Fixes the issue raised here: Update MakieExt compat #15 (comment)
  2. Defaults the custom_epoch used for the conversion to UNIX_EPOCH. This is because the current behaviour (picking the custom epoch to be the last plotted point in the axis) causes multiple axes in the same figure to be misaligned when they have different epochs. It is still possible to set a custom epoch for higher precision on recent dates with:
fap = Makie.lines(times, data)

fap.axis.dim1_conversion[].custom_epoch[] = unix_now()
reset_limits!(fap.axis)

(Unfortunately, constructing the UnixTimeConversion directly to pass to the axis requires the rather ugly Base.get_extension(UnixTimes, :UnixTimesMakieExt).UnixTimeConversion, as it isn't exported by UnixTimes.)

Tested on Makie@{0.22, 0.23, 0.24}

@JoaoAparicio

@rossviljoen rossviljoen requested a review from ancapdev July 20, 2025 17:34
@JoaoAparicio
Copy link
Contributor

#17

@ancapdev ancapdev merged commit 73e00e3 into master Jul 21, 2025
@ancapdev ancapdev mentioned this pull request Jul 21, 2025
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.

4 participants