Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rotating the surface plot with colorbar

16 views
Skip to first unread message

Michael Okuntsov

unread,
Jan 30, 2016, 3:54:36 AM1/30/16
to
Hi,
I have a 3d plot with points plotted by the function scatter3 and a
transparent cylinder. I can rotate it with mouse, but only if there is
no colorbar, otherwise it can't rotate. So, if colorbar is present, the
plot can't be rotated, or there is another way to do it?
Thanks.

clear all;
graphics_toolkit("gnuplot");

x=[-6.5,-5,-2,0,2,5,6.5];
y=[0,0,0,0,0,0,0];
z=[22.5,22.5,22.5,22.5,22.5,22.5,22.5];
v=[70.7,70.8,68.5,69.4,72,73.8,78];

x=[x,-6.5,-5,-2,0,2,5,6.5];
y=[y,0,0,0,0,0,0,0];
z=[z,18,18,18,18,18,18,18]
v=[v,103,103,92.2,95.7,96.5,109,120];

x=[x,0,0,0,0,0,0];
y=[y,-6.5,-5,-2,2,5,6.5];
z=[z,18,18,18,18,18,18]
v=[v,115,112,95.7,93.9,118,110];

x=[x,-6.5,-5,-2,0,2,5,6.5];
y=[y,0,0,0,0,0,0,0];
z=[z,12.5,12.5,12.5,12.5,12.5,12.5,12.5];
v=[v,121,129,123,126,126,134,154];

x=[x,0,0,0,0,0,0];
y=[y,-6.5,-5,-2,2,5,6.5];
z=[z,12.5,12.5,12.5,12.5,12.5,12.5];
v=[v,128,133,121,126,131,151];

x=[x,-6.5,-5,-2,0,2,5,6.5];
y=[y,0,0,0,0,0,0,0];
z=[z,6.5,6.5,6.5,6.5,6.5,6.5,6.5];
v=[v,124,130,126,123,137,148,155];

x=[x,0,0,0,0,0,0];
y=[y,-6.5,-5,-2,2,5,6.5];
z=[z,6.5,6.5,6.5,6.5,6.5,6.5];
v=[v,140,139,128,129,155,148];

x=[x,-6.5,-5,-2,0,2,5,6.5];
y=[y,0,0,0,0,0,0,0];
z=[z,0.9,0.9,0.9,0.9,0.9,0.9,0.9];
v=[v,105,109,102,100,109,127,127];

x=[x,0,0,0,0,0,0];
y=[y,-6.5,-5,-2,2,5,6.5];
z=[z,0.9,0.9,0.9,0.9,0.9,0.9];
v=[v,131,116,106,121,132,130];

s(1:length(x))=30
figure
hold on
[a,b,c]=cylinder([7.8,7.8],20);
c=c*24.5;
h=surf(a,b,c);
set(h,'facealpha',0.05);
hidden('on');
scatter3 (x(:), y(:), z(:), s, v(:),"filled");
colorbar('location','EastOutside');
hold off

Andreas Weber

unread,
Feb 20, 2016, 11:55:09 AM2/20/16
to Michael Okuntsov
Hi Michael,
I really think this newsgroup is dead and only monitor it from time to
time. The primary help resource where you'll also meet the developer is
the mailinglist he...@octave.org

(see http://www.gnu.org/software/octave/support.html)

I've tried your code with a current Octvate 4.0 and the qt graphics
toolkit. With this I'm able to rotate the plot so I guess it's a gnuplot
problem.

-- Andy

0 new messages