You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The objective of this proposal is being able to redraw the plot without changing axis labels etc.
There are several ways of adding this feature, the one used in matplotlib is using an instance of a class, but as first draft I developed a simple generator that is able to do the same:
fromuniplotimportplot_genplot_g=plot_gen(
**{
"lines": [True, True],
"width": 180,
"x_unit": "$",
"y_unit": "$",
"color": ["green", "red"],
}
)
next(plot_g)
args= {}
plot_g.send(([1,2,3], [4,3,2], args)) # pass only data that changes.# the plot is plottedplot_g.send(([1,2,3], [2,3,2], args))
# the plot is modified
With this structure we avoid creating a class for the plot, though it may be desirable to do so, I could also make a draft of that if you like it more.
The text was updated successfully, but these errors were encountered:
@PabloRuizCuevas I've been thinking about this in the context of how to make the library more flexible for different use cases, also how it relates to #23.
What I did for v0.16.0 is to add a plot_gen function that should essentially do what you need. I did run into issues with the generator functionality itself, so it's just a simple wrapper but should work. You can check out examples/5-streaming.py to see if this is what you need.
The objective of this proposal is being able to redraw the plot without changing axis labels etc.
There are several ways of adding this feature, the one used in matplotlib is using an instance of a class, but as first draft I developed a simple generator that is able to do the same:
https://github.com/PabloRuizCuevas/uniplot/blob/master/uniplot/uniplot.py
With this structure we avoid creating a class for the plot, though it may be desirable to do so, I could also make a draft of that if you like it more.
The text was updated successfully, but these errors were encountered: