Groups | Search | Server Info | Login | Register


Groups > comp.soft-sys.octave > #85

Rotating the surface plot with colorbar

From Michael Okuntsov <okuntsov.mikhail@yandex.ru>
Newsgroups comp.soft-sys.octave
Subject Rotating the surface plot with colorbar
Date 2016-01-30 14:54 +0600
Organization A noiseless patient Spider
Message-ID <n8htj2$b04$1@dont-email.me> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.octave | Previous | NextNext in thread | Find similar


Thread

Rotating the surface plot with colorbar Michael Okuntsov <okuntsov.mikhail@yandex.ru> - 2016-01-30 14:54 +0600
  Re: Rotating the surface plot with colorbar Andreas Weber <info@tech-chat.de> - 2016-02-20 17:55 +0100

csiph-web