[Scilab-users] Needs help with surface plot & colormap

surender_kumar surenderkumar1987 at gmail.com
Tue Jul 2 18:22:39 CEST 2013


// using a (1x2)subplot matrix 
// it divides the whole plot in two halves
// first half of plot
//
subplot(121)
x=linspace(0,%pi,100);
plot(sin(x));
//
// second half of plot
subplot(122)
y=linspace(%pi,2*%pi,100);
plot(sin(y));
// 
// there is an intervening space between two subplots (along x-axis), now
// I want to remove this intervening  space so that the final plot looks
like
// the following 
//z=linspace(0,2*%pi,200);
//plot(sin(z));
//
// in my case the x-value are like
// plot##1
// x goes from -1.0 to 2.0 
// plot ##2
// x goes from 0.5 to 1.0
// plot##3
// x goes from 1.0 to 4.0
//
// y goes from 20 to 100 for ALL plots
//
// And I want to z=f(x,y) data such that
// y goes like 20, ....., 100   
// x goes like -1.0, .... ,2.0 , 0.5, .... ,1.0, ....., 4.0
//
//------------------------------------------
# Same example using GNUPLOT

set multiplot
set tics nomirror
set yrange [-1:1]
######## FOR FIRST PLOT ########
set key top right
set xtics 0,45,135
set origin 0,0
set size 0.5,1.0
set bmargin 2
set lmargin 5
set rmargin 0
set tmargin 1
set xrange [0:180]
plot sin(x*(pi/180.0)) t "sin(x)" w l lt 2 lw 2
######### FOR SECOND PLOT #########
set key center top
set format y ""
set noytics
set xtics 180,45,315
set origin 0.5,0
set size 0.5,1.0
set bmargin 2
set lmargin 0
set rmargin 1
set tmargin 1
set xrange [180:360]
plot sin(x*(pi/180.0)) t "sin(x)" w l lt 3 lw 2
unset multiplot
pause -1 "Press any key to continue"



--
View this message in context: http://mailinglists.scilab.org/Needs-help-with-surface-plot-colormap-tp4026829p4026942.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list