Comments (7)
cc: @one-more-minute; I haven't tried LT yet, so I don't have any experience with this.
PyPlot attempts to do inline plotting whenever displayable
returns true for image/png
or other supported image formats. In that case, it calls redisplay(fig)
from each plotting command.
LightTable's Display
subclass should probably overload redisplay(d, x)
to add x
to a queue of things to display (removing duplicates), and then flush the queue at the end of an input execution, similar to IJulia. See inline.jl, and the undisplay function (which is also called on the result of an input evaluation to avoid displaying the result twice).
from pyplot.jl.
Ok, but for starters I would settle for a separate plotting window being opened. This however does not happen.
from pyplot.jl.
That's because PyPlot thinks that inline display is available. You can run pygui(true)
to explicitly force a separate Python plotting window even if there is an inline display.
from pyplot.jl.
Looks like there was a bug in redisplay(x) that may have prevented it from working properly here.
from pyplot.jl.
Thanks for letting me know, I'll take a look at this.
from pyplot.jl.
This works now. Just call PyPlot's "figure()" method to see results inline.
import PyPlot
pplt = PyPlot
x = [x/1000 * 2_pi for x=1:1000]
y = sin(3_x + 4_cos(2_x))
pplt.plot(x, y, color="red", linewidth=2.0, linestyle="--")
pplt.title("Sample graph")
pplt.figure(1)
from pyplot.jl.
figure
shouldn't be necessary if redisplay
is implemented as I explained above.
from pyplot.jl.
Related Issues (20)
- Layer-backing can not be explicitly controlled on 10.14
- ticks = {Matrix} scuttles plot drawing HOT 3
- Error in Mac M1 HOT 2
- PyPlot does not display x and y coordinates
- __version__ not found when using PyPlot HOT 3
- twinx() and fgcolor issue HOT 2
- PyPlot Error
- Using PyPlot on CI suddenly fails HOT 1
- No working GUI backend found for matplotlib HOT 5
- unrelated println statement leads to blank plot
- getp not defined? HOT 1
- The show() method doesn't seem to work. HOT 2
- Window requires focus before functions return HOT 4
- Using the backend :qt not working HOT 1
- using PyPlot hangs/kills julia 1.8.5 or 1.9.0 on MacOS HOT 4
- Unable to install PyPlot (ResolvePackageNotFound conda error) HOT 2
- PyPlot.jl as a dependency breaks package registration? HOT 4
- ResolvePackageNotFound error in Ubuntu/Linux HOT 3
- `using PyPlot` crashes package precompilation on Julia v1.10.0-beta1 HOT 4
- Need a new release (Julia 1.10 PkgEval) HOT 2
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 pyplot.jl.