[Scilab-users] Stacked 2D plot in 3D
Claus Futtrup
cfuttrup at gmail.com
Sun Jan 28 12:24:59 CET 2018
Dear Scilabers
I am trying to make a kind-of 3D plot, but with lines (in 2D). Attached a
file that shows what I wish to do.
Below some code that shows current state, but given the desired result
(attached), I'm not happy with it. I'm "cheating" a bit to make plot3d
accept my input data and I Wonder if I'm on the wrong track?
Best regards,
Claus
// Test datafrequencies = [201 811 3183 12862 25113]; // Hzangles = [0
30 60 90]; // off-axis angles, degreesm_norm = [ 1.0 0.9945629
0.9643959 0.8756431;
1.0 0.9914442 1.0244046 0.9414654;
1.0 0.9910279 0.9670986 0.8932413;
1.0 0.9339808 0.8378147 0.7067978;
1.0 0.8985782 0.7536068 0.5074218];
s2d = scf();for i=1:length(angles) do
plot(frequencies,m_norm(:,i),'-k');endsa2d = gca();sa2d.log_flags
= "lnn"; // log x-axis
// Instead of above "flat" 2D plot,// now stack the plots in a 3D plot
stackplt = scf();sp = gca(); // Get current axis handlefor i=1:length(angles) do
anglei = [angles(i)-0.1 angles(i)+0.1]; // make size of arguments = 2
mi = [m_norm(:,i) m_norm(:,i)]; // so that it becomes a small surface
plot3d(frequencies,anglei,mi,alpha=85,theta=85,flag=[2,2,3]);//
plot3d(frequencies,angles,m_norm(:,i));
// above command creates error plot3d:
// Wrong size for input arguments #2 and #3: >= 2 expected.end//
plot3d(frequencies,angles,m_norm,alpha=85,theta=85,flag=[2,2,3]);
// This plot expects a "surface" - doesn't work for
linessp.log_flags = "lnn"; // log x-axis (frequencies)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180128/04070f90/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: YG%2520anat%2520off%2520axis.jpg
Type: image/jpeg
Size: 30221 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20180128/04070f90/attachment.jpg>
More information about the users
mailing list