This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Session 8: Plotting Graphs [June 6, 2011, 6:54 a.m.]


Objectives

In this session you will learn the following:

  1. Plotting 2 dimensional line graphs
  2. Annotating graphs with grids, axis labels, graph titles
  3. Exporting graphs for inclusion in documents
  4. Plotting 3 dimensional surface graphs
  5. 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.