summaryrefslogtreecommitdiff
path: root/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce
diff options
context:
space:
mode:
Diffstat (limited to 'Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce')
-rw-r--r--Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce b/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce
new file mode 100644
index 0000000..070290c
--- /dev/null
+++ b/Tutorial2_Plot/Scilab_code/Tutorial2_semilog.sce
@@ -0,0 +1,22 @@
+//This script demonstrate multi-plotting in Scilab
+clear
+clc
+
+//Import data from file
+Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data1.csv');
+
+//Segregate the data into variables
+y = Data(:,1);
+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);
+
+
+//Figure 2 is a loglog plot
+fig2 = figure();
+plot2d(y,x,[3,-1],logflag="ll")
+legends(['Length of x1','Length of x3'],[3,-1],opt="ur",font_size=1);