From 168f3114992f59d8782730ce47cb6911c62038ec Mon Sep 17 00:00:00 2001 From: Chayan Bhawal Date: Thu, 27 Sep 2018 15:35:36 +0530 Subject: Tutorial2_plotting_update --- Tutorial2/Scilab_code/Tutorial2_semilog.sce | 2 +- Tutorial2/Scilab_code/Tutotial2_plot_save.sce | 11 +- Tutorial2/Scilab_code/Tutotial2_plotting.sce | 4 +- Tutorial2/Scilab_code/plot_y_versus_x1.pdf | Bin 0 -> 18531 bytes Tutorial2/Scilab_code/plot_y_versus_x1.svg | 226 ++++++++++++++++++++++++++ 5 files changed, 232 insertions(+), 11 deletions(-) create mode 100644 Tutorial2/Scilab_code/plot_y_versus_x1.pdf create mode 100644 Tutorial2/Scilab_code/plot_y_versus_x1.svg diff --git a/Tutorial2/Scilab_code/Tutorial2_semilog.sce b/Tutorial2/Scilab_code/Tutorial2_semilog.sce index 57cb312..070290c 100644 --- a/Tutorial2/Scilab_code/Tutorial2_semilog.sce +++ b/Tutorial2/Scilab_code/Tutorial2_semilog.sce @@ -13,7 +13,7 @@ x = [Data(:,4) Data(:,5)] //Figure 1 is a semilog plot fig1 = figure(); plot2d(y,x,[1,2],logflag="nl") -legends(['Length of x1','Length of x3'],[1,2],opt="ur",font_size=1); +legends(['Length of x1','Length of x3'],[1,2],opt="ur",font_size=1,font); //Figure 2 is a loglog plot diff --git a/Tutorial2/Scilab_code/Tutotial2_plot_save.sce b/Tutorial2/Scilab_code/Tutotial2_plot_save.sce index baeecdc..1cf2566 100644 --- a/Tutorial2/Scilab_code/Tutotial2_plot_save.sce +++ b/Tutorial2/Scilab_code/Tutotial2_plot_save.sce @@ -7,19 +7,14 @@ Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data //Segregate the data into variables y = Data(:,1); -x1 = [Data(:,2) Data(:,4)] -x2 = [Data(:,3) Data(:,4)] +x1 = Data(:,2) //Figure 1 is y versus x1 fig1 = figure(); -plot2d(y,x1); - -//Figure 2 is y versus x2 -fig2 = figure(); -plot2d(y,x2); +plot(y,x1); //Export Figure 1 as svg file xs2svg(fig1,'plot_y_versus_x1') //Export Figure 2 as pdf file -xs2pdf(fig2,'plot_y_versus_x2') +xs2pdf(fig1,'plot_y_versus_x1') diff --git a/Tutorial2/Scilab_code/Tutotial2_plotting.sce b/Tutorial2/Scilab_code/Tutotial2_plotting.sce index 4b0fe59..b191b80 100644 --- a/Tutorial2/Scilab_code/Tutotial2_plotting.sce +++ b/Tutorial2/Scilab_code/Tutotial2_plotting.sce @@ -15,6 +15,6 @@ x4 = Data(:,5); //Plotting y versus x1 plot(y,x1); -//For labelling axes and adding a title to the plot -xtitle('Plot of y versus x1','Time','Length'); + + diff --git a/Tutorial2/Scilab_code/plot_y_versus_x1.pdf b/Tutorial2/Scilab_code/plot_y_versus_x1.pdf new file mode 100644 index 0000000..5e5bf5e Binary files /dev/null and b/Tutorial2/Scilab_code/plot_y_versus_x1.pdf differ diff --git a/Tutorial2/Scilab_code/plot_y_versus_x1.svg b/Tutorial2/Scilab_code/plot_y_versus_x1.svg new file mode 100644 index 0000000..0c938df --- /dev/null +++ b/Tutorial2/Scilab_code/plot_y_versus_x1.svg @@ -0,0 +1,226 @@ + + +0102468121416135791113152e-054e-056e-058e-053e-055e-057e-052.5e-053.5e-054.5e-055.5e-056.5e-057.5e-05 -- cgit