OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | --[[ $Id: x10.lua 9414 2009-01-29 22:48:54Z airwin $ |
| 2 | |
| 3 | Window positioning demo. |
| 4 | |
| 5 | Copyright (C) 2008 Werner Smekal |
| 6 | |
| 7 | This file is part of PLplot. |
| 8 | |
| 9 | PLplot is free software you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Library Public License as published |
| 11 | by the Free Software Foundation either version 2 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | PLplot is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU Library General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU Library General Public License |
| 20 | along with PLplot if not, write to the Free Software |
| 21 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 22 | --]] |
| 23 | |
| 24 | -- initialise Lua bindings for PLplot examples. |
| 25 | dofile("plplot_examples.lua") |
| 26 | |
| 27 | |
| 28 | ---------------------------------------------------------------------------- |
| 29 | -- main |
| 30 | -- |
| 31 | -- Demonstrates absolute positioning of graphs on a page. |
| 32 | ---------------------------------------------------------------------------- |
| 33 | |
| 34 | -- Parse and process command line arguments |
| 35 | pl.parseopts(arg, pl.PL_PARSE_FULL); |
| 36 | |
| 37 | -- Initialize plplot |
| 38 | pl.init() |
| 39 | |
| 40 | pl.adv(0) |
| 41 | pl.vpor(0.0, 1.0, 0.0, 1.0) |
| 42 | pl.wind(0.0, 1.0, 0.0, 1.0) |
| 43 | pl.box("bc", 0.0, 0, "bc", 0.0, 0) |
| 44 | |
| 45 | pl.svpa(50.0, 150.0, 50.0, 100.0) |
| 46 | pl.wind(0.0, 1.0, 0.0, 1.0) |
| 47 | pl.box("bc", 0.0, 0, "bc", 0.0, 0) |
| 48 | pl.ptex(0.5, 0.5, 1.0, 0.0, 0.5, "BOX at (50,150,50,100)") |
| 49 | pl.plend() |
| 50 |
