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

Plot object and Plots.jl compatibility #5

Closed
piever opened this issue Oct 13, 2017 · 3 comments
Closed

Plot object and Plots.jl compatibility #5

piever opened this issue Oct 13, 2017 · 3 comments

Comments

@piever
Copy link
Contributor

piever commented Oct 13, 2017

Following the discussion at #918, I wanted to discuss more in detail the following two points:

  • what is a (backend independent) plot object (as in Plots.Plot)?
  • to what extent this representation is compatible with

To clarify the first question, in Plots.jl a user command (say plt = scatter(rand(10, 2), markershape = :circle, color = :blue)) goes to a pretty sophisticated pipeline, at the end of which we get a "backend independent" plot object, where all the relevant information to display it is encoded explicitly.

I'd like to understand what is the equivalent of that in MakiE. The main thing that I could find is the Scene type. It is not completely obvious how everything is encoded there. It seems that the series are somehow encoded in the various scene.data[:scatter] entries, but I couldn't quite figure out how.

Also, I'm not entirely sure as to how the "interlinked" nature of the attributes is encoded in a Scene object. I'm assuming it is implemented with the MakiE.Node objects but I couldn't quite understand how (here's a relevant discussion in Plots: #1149), so docs on MakiE.Scene and MakiE.Node would be extremely appreciated.

The reason to ask all of this is to be able to build a constructor

function MakiE.Scene(plt::Plots.Plot)
    ...
end

so that in the future it will be possible to include your work on MakiE in the Plots echosystem.

@SimonDanisch
Copy link
Member

Ha, that is an interesting idea :) I've actually started documenting those, just need to push them - which needs a bit of clean up since I'm documenting some functionality that doesn't work right now (has bugs).

@SimonDanisch
Copy link
Member

Btw, I kinda got rid of series :D convince me from the opposite, but it just feels like a bad idea destroying composition and makes the backend code pretty messy. I think there should only by shared transformations and attributes - which the backend should be unaware of and which I encode in the scene via, what you already figured out, linking the nodes!

@piever
Copy link
Contributor Author

piever commented Oct 13, 2017

Cool, I'll be checking out the new docs as they get updated then. Afterwards we could start discussing how feasible this Plot to Scene constructor is and where it should live.

SimonDanisch pushed a commit that referenced this issue Jun 3, 2021
SimonDanisch added a commit that referenced this issue Jun 3, 2021
…4-25-01-05-30-355-356214310

CompatHelper: add new compat entry for "Observables" at version "0.4"
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

No branches or pull requests

2 participants