help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2D plot with colormap


From: guido.bonalumi
Subject: 2D plot with colormap
Date: Sun, 12 Oct 2014 06:45:13 -0700 (PDT)

Hi everyone!
I am trying to plot some fields (velocity and pressure fields) using the
colormap option. The results is quite good but I need help for some
improvements.
Here is my code:
/cd output
data_U = csvread('U_2014_10_05.csv');
cd ..

X_min = min(data_U(:,1));
X_max = max(data_U(:,1));
Y_min = min(data_U(:,2));
Y_max = max(data_U(:,2));

data_U(:,1) = data_U(:,1) - X_min;
data_U(:,2) = data_U(:,2) - Y_min;

Xi = linspace(0,X_max-X_min,1000);
Yi = linspace(0,Y_max-Y_min,1000);

[XX YY]=meshgrid(Xi,Yi);

Ui = griddata(data_U(:,1), data_U(:,2), data_U(:,3), XX, YY);

map=jet(16);
colormap (map);
surf(XX,YY,Ui);
shading interp;

#title("Vista frontale");
#xlabel("x");
#ylabel("y");

axis ('off', "image");
colorbar("EastOutside");

#set(gca, 'XGrid', 'off');
#set(gca, 'YGrid', 'off');

#caxis("auto");
caxis([0 93.6]);

view(2)
print -color velocita_2014_10_05.eps/

My issues are:
1. The colorbar overlaps the graph even if I used the "EastOutside" option.
Why?
2. Is it possible to have the maximum value (93.6) shown on the top of the
colorbar?
3. Is it possible to add, instead of the two classical axis, a small
reference system in the lower left corner? Something like the small set of
arrows that usually show up in the lower left corner in Paraview (for the
ones who are familiar with it). Maybe without color, just with black arrows
and the labels for the 3 directions (x, y and z).
4. The graph is good but not correct at the moment and I need to exclude
some values:
    - The values inside the blade (all zeros) so the blade will be white as
the outside of the channel.
    - The values outside the pressure side of the channel: they are not
real, but they have been created by the interpolation. I do not understand
why only there and not outside the suction side for example (look at the two
images attached for a better understanding of the problem).
<http://octave.1599824.n4.nabble.com/file/n4666931/velocita.jpg> 
<http://octave.1599824.n4.nabble.com/file/n4666931/velocita2.jpg> 

Can anybody help me? Thanks in advance!



--
View this message in context: 
http://octave.1599824.n4.nabble.com/2D-plot-with-colormap-tp4666931.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]