1## Simple demo of a 2D line plot. 2## 3## Copyright (C) 2011 Alan W. Irwin 4## Copyright (C) 2012 Andrew Ross 5## 6## This file is part of PLplot. 7## 8## PLplot is free software; you can redistribute it and/or modify 9## it under the terms of the GNU Library General Public License as published 10## by the Free Software Foundation; either version 2 of the License, or 11## (at your option) any later version. 12## 13## PLplot is distributed in the hope that it will be useful, 14## but WITHOUT ANY WARRANTY; without even the implied warranty of 15## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16## GNU Library General Public License for more details. 17## 18## You should have received a copy of the GNU Library General Public License 19## along with PLplot; if not, write to the Free Software 20## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21## 22## 23 24function x00c 25 26 NSIZE = 101; 27 28 xmin = 0.; xmax = 1.; ymin = 0.; ymax = 100.; 29 30 ## Prepare data to be plotted. 31 x = (0:NSIZE-1) / (NSIZE-1); 32 y = ymax*x.*x; 33 34 ## Parse and process command line arguments 35 ## plparseopts( &argc, argv, PL_PARSE_FULL ); 36 37 ## Initialize plplot 38 plinit(); 39 40 ## Create a labelled box to hold the plot. 41 plenv( xmin, xmax, ymin, ymax, 0, 0 ); 42 pllab( "x", "y=100 x#u2#d", "Simple PLplot demo of a 2D line plot" ); 43 44 ## Plot the data that was prepared above. 45 plline( x', y' ); 46 47 ## Close PLplot library 48 plend1(); 49 50endfunction 51