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
From what I can tell the camera is 2D if the first thing plotted is flat, e.g. lines(1:20, rand(20), zeros(20) will use a 2D camera, (as will lines(1:20, rand(20), ones(20)) but lines(1:20, rand(20), rand(20)) will create a 3D camera. Adding a 3D plot after first adding a 2D plot doesn't seem to upgrade the camera to 3D.
I had expected the camera to be a property of the Scene, and would exist before you'd actually added any objects to the scene (it just wouldn't have anything to look at), and could be set with something like scene = Scene(camera=:perspective). Currently it seems like the camera is a property of the object being plotted (e.g. lines(1:20, rand(20), zeros(20), camera=:perspective), but I don't understand the use-case for per-object cameras.
For context, I hit this when trying to do a plot like this:
using a bunch of lines calls. Each one is flat so the scene ends up using the 2D camera.
The text was updated successfully, but these errors were encountered:
I agree, this is bad! I haven't considered upgrading the camera yet, but maybe that's a good way to go, although a bit finicky! But it might be a clean path forward to just have one camera per window. I'm also thinking about separating plots from scenes, which would make it more obvious that a scene can have it's own camera, but not a plot.
For this particular use case you might just want to plot the axis first as a work around ;)
From what I can tell the camera is 2D if the first thing plotted is flat, e.g.
lines(1:20, rand(20), zeros(20)
will use a 2D camera, (as willlines(1:20, rand(20), ones(20)
) butlines(1:20, rand(20), rand(20))
will create a 3D camera. Adding a 3D plot after first adding a 2D plot doesn't seem to upgrade the camera to 3D.I had expected the camera to be a property of the
Scene
, and would exist before you'd actually added any objects to the scene (it just wouldn't have anything to look at), and could be set with something likescene = Scene(camera=:perspective)
. Currently it seems like the camera is a property of the object being plotted (e.g.lines(1:20, rand(20), zeros(20), camera=:perspective)
, but I don't understand the use-case for per-object cameras.For context, I hit this when trying to do a plot like this:
using a bunch of
lines
calls. Each one is flat so the scene ends up using the 2D camera.The text was updated successfully, but these errors were encountered: