Comments (3)
I ran into the same problem, maybe we can work out a solution together. The crash seems to happen when unpacking the return values, as opposed to in the actual call. I'm saying this because if you call foo = subplots(3,3)
it doesn't crash!
I got as far as this:
(fig, ax) = convert((Figure, PyArray), subplots(3, 3))
Now ax
contains an array of pointers to PyObject
s. I then tried
ax = reshape([unsafe_load(a) for a in ax], size(ax))
to get a julia Array
of PyObject
s. The problem is that I didn't succeed using these axes yet.
from pyplot.jl.
Glad to hear someone else was bothered by this (I use subplots all the time). I think I figured out the problems (there were two issues): First, the iteration logic on PyObjects was broken. Second, numpy record types (like what's returned by subplots) were not being automatically converted to Julia arrays.
from pyplot.jl.
Works like a charm. Once this is merged, we can plot things like
x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x));
(fig, ax) = subplots(2, 2, sharex=true, sharey=true)
ax[1][:plot](x, y, color="red", linewidth=2.0, linestyle="--")
ax[2][:plot](x, y, color="green", linewidth=2.0, linestyle="--")
ax[3][:plot](x, y, color="blue", linewidth=0.5, linestyle="--")
ax[4][:plot](x, y, color="orange", linewidth=2.0, linestyle="-")
from pyplot.jl.
Related Issues (20)
- __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
- Qt: Session management error on linux
- Pyplot crash on window HOT 8
- Displaying plots in vscode HOT 2
- violinplot not defined
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.