summaryrefslogtreecommitdiff
path: root/Tutorial2_Plot/Scilab_code
diff options
context:
space:
mode:
authorChayan Bhawal2018-09-27 21:08:17 +0530
committerChayan Bhawal2018-09-27 21:08:17 +0530
commit032dc034194100cb3428d073efd0a8ed05c3accd (patch)
treed5b675cb44a4085d95121dccfd92b7ba50bc13ab /Tutorial2_Plot/Scilab_code
parenta58151ad625782ff6bb5c45db686912e4cd84e1d (diff)
downloadscilab-tutorials-032dc034194100cb3428d073efd0a8ed05c3accd.tar.gz
scilab-tutorials-032dc034194100cb3428d073efd0a8ed05c3accd.tar.bz2
scilab-tutorials-032dc034194100cb3428d073efd0a8ed05c3accd.zip
Updating Plot folder
Diffstat (limited to 'Tutorial2_Plot/Scilab_code')
-rw-r--r--Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce4
-rw-r--r--Tutorial2_Plot/Scilab_code/Tutotial2_multi_plotting.sce6
-rw-r--r--Tutorial2_Plot/Scilab_code/Tutotial2_plot_save.sce13
-rw-r--r--Tutorial2_Plot/Scilab_code/Tutotial2_plotting.sce2
4 files changed, 15 insertions, 10 deletions
diff --git a/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce b/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce
index 070290c..833855b 100644
--- a/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce
+++ b/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce
@@ -3,7 +3,7 @@ clear
clc
//Import data from file
-Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data1.csv');
+Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2_Plot/Data/Tut2_data1.csv');
//Segregate the data into variables
y = Data(:,1);
@@ -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,font);
+legends(['Length of x1','Length of x3'],[1,2],opt="ur",font_size=1);
//Figure 2 is a loglog plot
diff --git a/Tutorial2_Plot/Scilab_code/Tutotial2_multi_plotting.sce b/Tutorial2_Plot/Scilab_code/Tutotial2_multi_plotting.sce
index 91e4f20..e149334 100644
--- a/Tutorial2_Plot/Scilab_code/Tutotial2_multi_plotting.sce
+++ b/Tutorial2_Plot/Scilab_code/Tutotial2_multi_plotting.sce
@@ -3,7 +3,7 @@ clear
clc
//Import data from file
-Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data1.csv');
+Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2_Plot/Data/Tut2_data1.csv');
//Segregate the data into variables
y = Data(:,1);
@@ -33,3 +33,7 @@ xtitle('Plot of Time versus Length_x1 and Length_x3','Time','Length');
legends(['Length of x1','Length of x3'],[-1,2],opt="ur",font_size=2); //Font size of the legends
+
+
+
+
diff --git a/Tutorial2_Plot/Scilab_code/Tutotial2_plot_save.sce b/Tutorial2_Plot/Scilab_code/Tutotial2_plot_save.sce
index 1cf2566..20a8427 100644
--- a/Tutorial2_Plot/Scilab_code/Tutotial2_plot_save.sce
+++ b/Tutorial2_Plot/Scilab_code/Tutotial2_plot_save.sce
@@ -3,18 +3,19 @@ clear
clc
//Import data from file
-Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data1.csv');
+Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2_Plot/Data/Tut2_data1.csv');
//Segregate the data into variables
y = Data(:,1);
x1 = Data(:,2)
-//Figure 1 is y versus x1
-fig1 = figure();
-plot(y,x1);
+//Figure 1 is y versus x1 with linewidth = 3
+//fig1 = figure();
+fig1 = scf(1);
+plot(y,x1,'Linewidth',3);
//Export Figure 1 as svg file
-xs2svg(fig1,'plot_y_versus_x1')
+xs2svg(fig1,'plot_y_versus_x1');
//Export Figure 2 as pdf file
-xs2pdf(fig1,'plot_y_versus_x1')
+xs2pdf(fig1,'plot_y_versus_x1');
diff --git a/Tutorial2_Plot/Scilab_code/Tutotial2_plotting.sce b/Tutorial2_Plot/Scilab_code/Tutotial2_plotting.sce
index b191b80..f16018c 100644
--- a/Tutorial2_Plot/Scilab_code/Tutotial2_plotting.sce
+++ b/Tutorial2_Plot/Scilab_code/Tutotial2_plotting.sce
@@ -3,7 +3,7 @@ clear
clc
//Import data from file
-Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data1.csv');
+Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2_Plot/Data/Tut2_data1.csv');
//Segregate the data into variables
y = Data(:,1);