Makie.jl: [Feature request] Convenience functions like Plots.jl has

Created on 24 Jun 2019  路  11Comments  路  Source: JuliaPlots/Makie.jl

Convenience functions, like xlabel!, ylabel!, or as @mschauer suggested, axis!...

good first issue help wanted planning

All 11 comments

@mkborregaard, any thoughts on more we could add? The current stuff should be relatively easy, just a check that the Scene has an Axis we can manipulate, and then paste in the current syntax.

Plots has in addition: title!, [x/y/z]lims!, [x/y]ticks!, annotate!, [x/y]flip!, [x/y]axis! and [x/y]grid!, cf https://github.com/JuliaPlots/Plots.jl/blob/master/src/shorthands.jl#L390-L455.

Just putting this here as a note, so I don't forget:

  • [x/y/z]lims! should be fairly easy to do with update_limits! or just updating the limits directly.
  • [x/y]flip! is hard because of scaling issues. That should be worked out fairly soon, though...and it's always possible to hack it.
  • [x/y]ticks! looks like it could be done using the current API very easily, nice to have though.
  • We'll need to figure out axis! and grid! after the inevitable layouting refactor...
  • There are also a lot of mentions of recipes that look fairly easy to implement using Makie.

Thanks, @daschw!

See #368 for a list of other (theoretically) portable Plots.jl shorthands to Julia.

Would this include support for dynamic/live axes? See a crude MWE here.

At present there's not an obvious way to obtain a scrolling effect without calling update! and update_limits! This mirrors the gallery example: Animated time series

While with one small plot the overhead is bearable (40-50fps), calling the update functions slows render time ~200X....I think it will take a dump if trying to draw multiple signals/bigger data.

It's not obvious from the docs or after inspecting the Scene() object, but can camera position/axis limits, etc be treated as an observable? Or redrawn independently? Will these proposed convenience functions modularize scene redrawing (i.e. instead of a full canvas reparametrization and redraw, dictate a lift() for axis/grid/etc)?

Dynamic axes would be a problem, since they would require the line segments representing the axis boundaries to be redrawn every update. You could try the newly introduced timeseries recipe, which incorporates some optimizations.

Oh nice! I will give it a go tomorrow while I am at the lab.

Had a look at timeseries. It works albeit with some warnings. The basic idea is more or less what one would be looking for to plot realtime signals but I can see there needs to be some additional fleshing out/extension.

1) Only single points are accepted atm. Often when working with incoming high frequency data it's delivered in chunks from whatever digital/analog interface you have. Generalizing to accept a vector of new points would be more useful. (e.g. a hardware DAQ board sampling at 1kHz might deliver 100 samples/new points every 100ms)

2) history ought to be exposed to control the displayed time scale relative to the sampling rate
3) similarly, being able to define units for the tick labels, particularly X axis (y-axis units could be handled by the user, applying a simple scalar to whatever the signal is)

I am happy to put some effort toward this since it would be super useful in my work. However I may be slow since it looks like the rabbit hole goes quite deep to understand how things are working from the level of recipes down to rendering!

In any case, its wicked to see the beginnings of realtime signal display. (I have some high speed cameras that I may test with Makie...thinking computer vision style display/overlays/interaction :) )

So I was going to try and address the ticks attributes but I'm not sure where these should go. It looks like these are being added to AbstractPlotting now. Is that the best place to make a PR for these now?

Yep, AbstractPlotting is where the code is. You might also want to have a look at jkrumbiegel/MakieLayout.jl.

Oh, didn't realize you were on the Makie slack as well @Tokazama :D...nice to see you here!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SebastianM-C picture SebastianM-C  路  3Comments

tshort picture tshort  路  5Comments

daviehh picture daviehh  路  3Comments

asinghvi17 picture asinghvi17  路  5Comments

mschauer picture mschauer  路  4Comments