Skip to main content Accessibility help
Internet Explorer 11 is being discontinued by Microsoft in August 2021. If you have difficulties viewing the site on Internet Explorer 11 we recommend using a different browser such as Microsoft Edge, Google Chrome, Apple Safari or Mozilla Firefox.

Chapter 2: Plotting and Graphics Design

Chapter 2: Plotting and Graphics Design

pp. 37-94

Authors

, University of Delhi
  • Add bookmark
  • Cite
  • Share

Extract

Introduction

The science of physics generally deals with physical phenomena where one quantity (called an independent variable) is related to another quantity (called a dependent variable) through a mathematical equation. The graphical representation of these data is a convenient tool for deciphering this scientific information. It is of utmost importance that the experimental data should be plotted very carefully so that it is easy to appropriately visualize and interpret the relationship between the dependent and independent variables. For example, it is always advisable to

  • • Choose the units of the coordinate axes in an appropriate manner.

  • • Choose the coordinate axes so that the entire data are accommodated.

  • • Choose logarithmic scales if the range of variables is large.

  • • Interpolate the data to generate a smooth curve traversing through the data points.

  • • Mark the data points with markers and error bars wherever available.

  • • Label the graph properly and write a concise title that summarizes the graph.

  • • Describe each part of the graph with the help of suitably placed legends.

This chapter introduces the reader to various plotting commands invariably used in this book for developing meaningful graphs. The importance of this chapter lies in the fact that it gives an overview on writing small user-defined functions for generating self-explanatory graphs, instead of writing long codes.

The graphical representation of data can be formatted by three methods in Scilab

  • • By using the figure and axes properties present in the main menu bar of the graphical window.

  • • By using Scilab instructions at the command line on the console.

  • • By writing user-defined functions and invoking them at the console.

The first method is trivial and is left for the reader to explore. In most of the following chapters, graphs and plots have been formatted using small functions that are executed in a script. The major focus of this chapter is to introduce the reader to this kind of formatting tool. However, for completeness, direct command line instructions have also been mentioned wherever possible.

The layout of this chapter is as follows. The Scilab commands ‘plot’ and ‘plot2d,’ have been used in this book for generating graphs. Section 2.2 starts with highlighting the basic difference between these two commands and manipulating them so that they are on equal footing. This section also focuses on writing small functions for editing the coordinate axes.

About the book

Access options

Review the options below to login to check your access.

Purchase options

eTextbook
US$85.00
Paperback
US$85.00

Have an access code?

To redeem an access code, please log in with your personal login.

If you believe you should have access to this content, please contact your institutional librarian or consult our FAQ page for further information about accessing our content.

Also available to purchase from these educational ebook suppliers