Problem with "view" to save the orientation of a plot and then use it for another
Mostra commenti meno recenti
Hi, I'm trying to save the position of a plot in a subplot in order to plot the next with the same orientation (the code was performed already)
I tried with : orientation = view; % Its output is a 4 by 4 matrix. and then: view(orientation)
but I have an error in the second line I wrote: "Error using ==> view>ViewCore Argument must be scalar, or two-vector"
Could you help me, please?
Risposta accettata
Più risposte (2)
rjarvinen
il 5 Mar 2012
0 voti
Is there a way to store all camera settings in a variable and re-use them in several plots? Does the 4-by-4 matrix returned by the view function include all the camera and view information?
What I have done is to manually adjust the camera and view properties in the GUI for a single 3-D plot. Now I would like to save this configuration for easy later use to avoid doing this again for other similar plots.
view([az el]) is not enough since it does not include all the camera properties a user can adjust in the GUI.
Anton
il 20 Mar 2012
very stupid to take away this backward compatibility! I had a script where the 4-by-4 matrix was stored in a variable A and the figure rotated with view(A) - fortunately it was always the same matrix (constant) and I simply changed the line to view(-46,44) to have an appropriate 3D-like view of my figure.
A= 1.0e+04*[ 0.4496 -0.4782 0.0000 0.0143
0.3244 0.2981 0.0000 -0.3113
0.3587 0.3298 -0.0000 4.2989
0 0 0 0.0001];
May be there is a simple way to transform this 4x4 matrix to the two angles, but it is very strange that 16 values were used instead of 2 befor and that there is no way to use this matrix directly now (you can still generate it with A=view)
1 Commento
Benjamin M. Friedrich
il 19 Gen 2024
I could not agree more.
Categorie
Scopri di più su MATLAB Support Package for USB Webcams in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!