Comments (22)
👍 I started messing around with plotting methods for OnlineStats, so this would be great.
from plots.jl.
Better call it 'near-real-time' updating, or 'Update Data'. People would expect real-time plotting and for e.g. a PDF output that's hard to do...
from plots.jl.
@joshday Cool... are you working on the "josh" branch? I have some ideas there... maybe we should start an issue to discuss at OnlineStats?
@lobingera I hear ya... certainly the degree of "real-time-ness" depends on the backend. Likely UnicodePlots and Gadfly aren't good for this, but any of the others could be?
from plots.jl.
But it like this: real-time-update sounds like you connect some data with some graph and if the data is updated, the graph follows. Actually earlier (some months ago) i asked if the REPL can support this -> filter, what has been changed (LHS of evaluation,assignment) and feed that information somewhere. Back then the REPL wasn't able, but maybe now. In any case you need some infrastructure to get that change down. How about auto-scaling in cases like this?
from plots.jl.
real-time-update sounds like you connect some data with some graph and if the data is updated, the graph follows
This is exactly what I want to do, and the prototype can already work this way. You can just call gui()
to update the display between each push!
.
This currently works as expected (on master)... one extra point is added to the graph every half-second:
using Plots; immerse!()
plt = plot([0,0.1], Any[rand(2),sin])
for x in 0.2:0.1:π
push!(plt, 1, x, rand())
push!(plt, 2, x, sin(x))
gui(); sleep(0.5)
end
from plots.jl.
as a side question: why immerse!() ? I thought, ! methods are supposed to change the argument, and there's little argument
from plots.jl.
@lobingera My interpretation of !
methods is that they are appropriate whenever you are changing state (whether or not that state belongs to the arguments). For this particular case, I agree that the !
probably isn't necessary, and I could add immerse()
to do the same thing.
from plots.jl.
Also technically speaking the plot!(rand(10))
calls fall into this category as well. You're changing the state of a Plot
object, but it's not an argument to the method, it just happens to change the state of the return value from currentPlot()
.
from plots.jl.
Statefull vs. stateless plot commands is a tricky thing. Statefull makes great sense in REPL, but not necessarily in scripted plotting. And maybe this discussion should be in #1
from plots.jl.
I don't think I understand your point. Why is REPL any different than scripting here?
from plots.jl.
In regards to the real-time-ness discussion, I ran a quick test... 17 millis per update may not be "real-time" but it's certainly close enough for most applications (and certainly better than re-writing a PDF every time). However, in most cases you wouldn't update the display after every data point unless the points were updating very slowly.
from plots.jl.
@tbreloff
In the REPL you work with a single scope, so the state will be atomic. When you run a script in a single instance you will use a single state, but what if you try to parallelize?
from plots.jl.
You can always call plot!(plt, args...; kw...) and control which object's state is changed...
On Sep 24, 2015, at 5:04 PM, Andreas Lobinger [email protected] wrote:
@tbreloff
In the REPL you work with a single scope, so the state will be atomic. When you run a script in a single instance you will use a single state, but what if you try to parallelize?—
Reply to this email directly or view it on GitHub.
from plots.jl.
I have pretty good support for updating plots now, so closing this.
from plots.jl.
Is there a way to push errorbars or ribbons?
Something like this?
push!(plt, 3, 1, err = 2)
push!(plt, 3, 1, ribbon = 2)
If not is there a workaround?
At the moment I get the following error:
ERROR: function push! does not accept keyword arguments
from plots.jl.
plot!
?
from plots.jl.
Well, I think plot!
does only add a new line to the current plot, doesn't it?
Whereas, I want to extend a current errorbar / ribbon at the end with a new value.
from plots.jl.
If you give an MWE I wouldn't mind commenting on what you're doing. But push!
isn't defined for Plot
objects.
from plots.jl.
Here you go:
using Plots
plt = plot(1:10, zeros(10), err = randn(10))
push!(plt, 1, 11, 0.1)
This extends the line without the errorbar by a new value.
Is there a way to do the same for the errorbars?
from plots.jl.
Ha, I didn't realize you could do that :-) I just looked at the code, and no, it doesn't seem like you can do that, sry.
from plots.jl.
I think I found a workaround using plot!
using Plots
plt = plot(1:10, zeros(10), err = randn(10))
plot!(plt, 11:11, 0.1:0.1, err = 0.5, legend=false)
push!(plt, 1, 11, 0.1)
from plots.jl.
I have a plot for each of a 100 samples run for 1000 iterations, so it creates an array of 100 plots. How is it possible to merge these into one plot ?
Thank you for your inputs
from plots.jl.
Related Issues (20)
- PythonCall.pyisnone() does not exist, please remove it from source code HOT 1
- [BUG] heatmap output shifts relative to axis when using logarithmic xscale and setting xlims on GR HOT 1
- [BUG] Arrow does not work with pgfplotsx
- Warning when loading Plotly backend
- [BUG] Huge vertical margin of `plot_title` HOT 8
- [FR] Improve the `xticks!` dosctring
- [FR] savefig("foo.svgz") (gzip-compressed SVG) HOT 1
- [BUG] grouping Measurement data leads to wrong errorbars in plot
- [BUG] PGFPlotsX doesn't colour certain markers in a scatter plot.
- Support for PlotlyKaleido@2
- Feature request: add keyword to make Julia wait until plot window closes
- [BUG] Julia 1.10.2 fails when trying to add or use Plots issuing Pkg.add("Plots") or using Plots HOT 11
- [FR] Flip yaxis of heatmap
- [FR] Better legends for :vline and :hline HOT 1
- [BUG] Plots.jl dependencies are broken, cannot install the package HOT 3
- [FR] Reproducible output with PGFPlotsX backend
- [BUG] Markers not in legend when plotting step functions
- [BUG] Incorrect display of negative signs in tick labels with non-default fonts in PDF outputs
- [BUG] link=:y doesn't work across nested subplots with layout HOT 2
- [BUG] Precompile fails in Julia 1.10.3: Buffer overflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plots.jl.