Session 8: Plotting Graphs [June 6, 2011, 6:54 a.m.]
Objectives
In this session you will learn the following:
- Plotting 2 dimensional line graphs
- Annotating graphs with grids, axis labels, graph titles
- Exporting graphs for inclusion in documents
- Plotting 3 dimensional surface graphs
- Plotting multiple graphs on one page (subplot())
Functions for Plotting
In this session, we will learn the following functions:
plot(), plot2d(), xgrid(), xtitle(), legend(), plot3d(), linspace()
Plotting Basics
Scilab is a data plotter, that is, it plots graphs from the data you input. This is in contrast to function plotting programs (such as gnuplot) which plot graphs of functions without the user having to first explicitly generate the data required to plot the graph. Function plotting programs will decide the range of the values of independent variable and its data interval, generate the data on the fly and plot the graph.