-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
PlotSpec: Add object to hold backend-independent input specification #390
Comments
I fully support. Some time ago (~ 2years) there was a another discussion about plotting tools on julia-users and on my wish list were:
|
Hi @lobingera,
Personally, I like this idea. This works well for my own needs to generate static plot objects (no animations - or anything fancy). So that's what I did for my own Plots.jl-like module (before I learned of Plots.jl):
To avoid unnecessarily loading the HDF5 module, I moved the .hdf5 writer to a module called I currently have support for a few "backends" myself under
Having said that Many of these advanced features seem to work well with the more command-oriented (as opposed to data-oriented) structure used by most plotting packages (including Plots.jl). Could these features be elegantly tackled using a data-oriented approach? Would people actually prefer the data-oriented approach once they got used to it? --> I do not really know - because I don't really deal with those particular problems at this time. That's why I am not trying to push my own solution onto people. I think I would rather see Plots.jl support a generic load/save system in an environment that most users are likely to accept. Maybe someone else out there has more experience on this subject... |
To be clear, the return value of a call to 'plot' IS a data structure. It's On Saturday, July 16, 2016, ma-laforge notifications@github.com wrote:
|
Yes, I realized this might hit a string. Sorry: this statement is more about the way we use the tool than the implementation being constructed from datastructures. I don't quite know how to explain myself, but I wil try: If I understand nomenclature correctly, Plots.jl implementation seems to conform to the MVC (Model-View-Controller) structure. In this paradigm, Plots.jl defines a consistent >>Interface<< to the user - as opposed to a generic object. Just to be clear: I'm not saying this is bad in any way. In fact, it has many advantages... I think it is probably a good system for interactive plots like animations. Other implications That means that unlike the solution from
I guess this is a small distinction, but I think it potentially has important impact on the use model. |
I was about to say that I agree with you, except that the underlying object With that said, I have been wanting to store user inputs separate from a (I don't know when/if I'll tackle this) On Saturday, July 16, 2016, ma-laforge notifications@github.com wrote:
|
Excellent: I think we are starting to close in on the same terminology. Yes: I agree that different backends might require different underlying objects to account for the different supported features... Though it sounds like "reciepes" might be able to eliminate this need by providing a "failsafe" for non-supported features (here's hoping!). If I understand your terminology correctly: My Point of the RFC Basically: I would like it if my future plot system also included a backend-independent way to archive plots with its data. My experiments show that the HDF5 file format provides a good solution to saving a I'm a little affraid of using an actual "serialization" routine though - because that type of solution does not usually work well for archival purposes. I find a more rigidly defined file format that is not tied to the exact Julia object implementation is probably more readable/future proof. |
I renamed the issue to be in line with something I'd likely take action on... @ma-laforge hopefully this is everything you want it to be :) |
No problem. I am sure you will come up with something useful if/whenever you see people needing PlotSpec. Though I don't yet feel comfortable contributing to Plots.jl yet (I don't yet use enough features to really grasp the architecture & direction)... I am liking the progression so far. |
I just want to say that I've been thinking about this off-and-on for a few months, and fully intend to refactor Plots at some point to make it happen. I just haven't done it yet. :) |
@ma-laforge was this issue closed by #747 ? |
If I am to understand what @tbreloff said, I would say that technically, the issue is not closed by #747. I would have implemented the idea of However, if you are asking me if the original intent of this issue is satisfied, I would say yes. Though #747 is not an archival-quality solution (Basically an object dump that does not guarantee backwards compatibility), I believe it is an adequate solution for now. I would go ahead and close this issue unless @tbreloff disagreed. |
I edited the first post to show that the original intent is satisfied, but that the ideas developed here live on. I'll leave it open, but we'll not take action on it right now as there is lots of talk about different ways of refactoring Plots. |
My original vision of PlotSpec was that of an object that literally tracked
what the user explicitly set. Then as as that was changed, either
programmatically (adding data or series or legends, etc) or through user
interactivity, Plots would notice the changes and lazily update a built
Plot object using a dependency tree of attributes, also giving backends the
ability to lazily redraw only those items that changed (if they can support
that).
This vision would also support analytic pipelines, for example updating a
histogram as data is added to the underlying data vector.
I don’t think this vision has even beed specced out, let alone finished. If
someone wants to put this stuff into a new issue, awesome. Sorry I cannot
be the one to work on it!
Keep up the great work all! 👌
…On Tue, Nov 7, 2017 at 2:20 AM Michael Krabbe Borregaard < ***@***.***> wrote:
I edited the first post to show that the original intent is satisfied, but
that the ideas developed here live on. I'll leave it open, but we'll not
take action on it right now as there is lots of talk about different ways
of refactoring Plots.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#390 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA492ljFh1qUW8x-6W0cqVY-akug4h0Wks5s0ASugaJpZM4JN54l>
.
|
Sounds very similar to what I've been doing in Makie, so this vision is pretty close to being fully realized already! |
EDIT: The original purpose of this issue has been achieved in #747 , but it is now an issue for the refactor in the title.
Many plot tools have a way to save/load the plots to/from a file.
...But this solution ties the file type to a plot backend.
Why not have Plots.jl provide a virtual plot backend called :hdf5 (or something similar) that allows you to "render" the plot (and the plot data) to an .hdf5 file?
The plot could then be re-loaded from said .hdf5 file at a later time - then plotted on whichever backend the user desires.
The advantage of the .hdf5 format is that people can still make out the file contents even if you don't have the appropriate reader.
I think users might like this feature.
MA
The text was updated successfully, but these errors were encountered: