Michael Okuntsov
2016-01-30 08:54:35 UTC
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
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