From: <ai...@us...> - 2009-01-29 22:49:03
|
Revision: 9414 http://plplot.svn.sourceforge.net/plplot/?rev=9414&view=rev Author: airwin Date: 2009-01-29 22:48:54 +0000 (Thu, 29 Jan 2009) Log Message: ----------- Configure the initialization of all Lua examples. Make uniform copyright notices on Lua examples. Allow running of the Lua examples from the lua/examples subdirectory of the build tree. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/lua/x01.lua trunk/examples/lua/x02.lua trunk/examples/lua/x03.lua trunk/examples/lua/x04.lua trunk/examples/lua/x05.lua trunk/examples/lua/x06.lua trunk/examples/lua/x07.lua trunk/examples/lua/x08.lua trunk/examples/lua/x09.lua trunk/examples/lua/x10.lua trunk/examples/lua/x11.lua trunk/examples/lua/x12.lua trunk/examples/lua/x13.lua trunk/examples/lua/x15.lua trunk/examples/lua/x16.lua trunk/examples/lua/x18.lua trunk/examples/lua/x19.lua trunk/examples/lua/x22.lua trunk/examples/lua/x24.lua trunk/examples/lua/x25.lua trunk/examples/lua/x30.lua Added Paths: ----------- trunk/examples/lua/CMakeLists.txt trunk/examples/lua/plplot_examples.lua.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/CMakeLists.txt 2009-01-29 22:48:54 UTC (rev 9414) @@ -83,6 +83,9 @@ if(ENABLE_ocaml) add_subdirectory(ocaml) endif(ENABLE_ocaml) +if(ENABLE_lua) + add_subdirectory(lua) +endif(ENABLE_lua) # Configure Makefile.examples with some specific variables Added: trunk/examples/lua/CMakeLists.txt =================================================================== --- trunk/examples/lua/CMakeLists.txt (rev 0) +++ trunk/examples/lua/CMakeLists.txt 2009-01-29 22:48:54 UTC (rev 9414) @@ -0,0 +1,108 @@ +# examples/lua/CMakeLists.txt +### Process this file with cmake to produce Makefile +### +# Copyright (C) 2009 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +set(lua_STRING_INDICES +"01" +"02" +"03" +"04" +"05" +"06" +"07" +"08" +"09" +"10" +"11" +"12" +"13" +"15" +"16" +"18" +"19" +"22" +"24" +"25" +"30" +) + +set(lua_SCRIPTS) +foreach(STRING_INDEX ${lua_STRING_INDICES}) + set(lua_SCRIPTS ${lua_SCRIPTS} x${STRING_INDEX}.lua) +endforeach(STRING_INDEX ${lua_STRING_INDICES}) + +set(PERM_SCRIPTS +OWNER_READ +OWNER_WRITE +OWNER_EXECUTE +GROUP_READ +GROUP_EXECUTE +WORLD_READ +WORLD_EXECUTE +) + +install(FILES ${lua_SCRIPTS} +DESTINATION ${DATA_DIR}/examples/lua +PERMISSIONS ${PERM_SCRIPTS} +) + +if(BUILD_TEST AND +NOT CMAKE_CURRENT_BINARY_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}" +) + # equivalent to install commands but at "make" time rather than + # "make install" time, to the build tree if different than the source + # tree. + set(command_depends) + foreach(file ${lua_SCRIPTS}) + set( + command_DEPENDS + ${command_DEPENDS} + ${CMAKE_CURRENT_BINARY_DIR}/${file} + ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file} + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ) + endforeach(file ${lua_SCRIPTS} ${lua_DATA}) + add_custom_target(lua_examples ALL DEPENDS ${command_DEPENDS}) +endif(BUILD_TEST AND +NOT CMAKE_CURRENT_BINARY_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}" +) + +set(lua_lib_location ${CMAKE_BINARY_DIR}/bindings/lua) +configure_file( +${CMAKE_CURRENT_SOURCE_DIR}/plplot_examples.lua.in +${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua +@ONLY +) + +set(lua_lib_location ${LIB_DIR}) +configure_file( +${CMAKE_CURRENT_SOURCE_DIR}/plplot_examples.lua.in +${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua_install +@ONLY +) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua_install +DESTINATION ${DATA_DIR}/examples/lua +PERMISSIONS ${PERM_DATA} +RENAME plplot_examples.lua +) Property changes on: trunk/examples/lua/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/examples/lua/plplot_examples.lua.in =================================================================== --- trunk/examples/lua/plplot_examples.lua.in (rev 0) +++ trunk/examples/lua/plplot_examples.lua.in 2009-01-29 22:48:54 UTC (rev 9414) @@ -0,0 +1,7 @@ +-- initialise Lua bindings for PLplot examples. +if string.sub(_VERSION,1,7)=='Lua 5.0' then + lib=loadlib('@lua_lib_location@/plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') + assert(lib)() +else + require('plplotluac') +end Property changes on: trunk/examples/lua/plplot_examples.lua.in ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/examples/lua/x01.lua =================================================================== --- trunk/examples/lua/x01.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x01.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -21,16 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end - - -- Variables and data arrays used by plot generators x = {} y = {} Modified: trunk/examples/lua/x02.lua =================================================================== --- trunk/examples/lua/x02.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x02.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,16 +1,29 @@ --- $Id$ +--[[ $Id$ --- Multipl.e window and color map 0 demo. + Multiple window and color map 0 demo. --- initialise Lua bindings to pl.pl.ot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + ---------------------------------------------------------------------------- -- draw_windows -- Modified: trunk/examples/lua/x03.lua =================================================================== --- trunk/examples/lua/x03.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x03.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,17 +1,29 @@ --- $Id$ +--[[ $Id$ --- Polar plot demo. + Polar plot demo. + Copyright (C) 2008 Werner Smekal --- initialise Lua bindings to pl.pl.ot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + ---------------------------------------------------------------------------- -- main -- Modified: trunk/examples/lua/x04.lua =================================================================== --- trunk/examples/lua/x04.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x04.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,17 +1,30 @@ --- $Id$ +--[[ $Id$ --- Log plot demo. + Log plot demo. + Simple line plot and multiple windows demo. + Copyright (C) 2008 Werner Smekal --- initialise Lua bindings to pl.pl.ot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + ---------------------------------------------------------------------------- -- plot1 -- Modified: trunk/examples/lua/x05.lua =================================================================== --- trunk/examples/lua/x05.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x05.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,15 +1,29 @@ --- $Id$ +--[[ $Id$ --- Histogram demo. + Histogram demo. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + -------------------------------------------------------------------------- -- main -- Modified: trunk/examples/lua/x06.lua =================================================================== --- trunk/examples/lua/x06.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x06.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,17 +1,29 @@ --- $Id$ +--[[ $Id$ --- Font demo. + Font demo. + Copyright (C) 2008 Werner Smekal --- initialise Lua bindings to pl.pl.ot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + ---------------------------------------------------------------------------- -- main -- Modified: trunk/examples/lua/x07.lua =================================================================== --- trunk/examples/lua/x07.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x07.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,16 +1,29 @@ --- $Id$ +--[[ $Id$ --- Font demo. + Font demo. + Copyright (C) 2008 Werner Smekal --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + base = { 0, 200, 500, 600, 700, 800, 900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900 } Modified: trunk/examples/lua/x08.lua =================================================================== --- trunk/examples/lua/x08.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x08.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,36 +1,29 @@ --[[ $Id$ - 3-d plot demo. + 3-d plot demo. - Copyright (C) 2009 Werner Smekal + Copyright (C) 2008 Werner Smekal - This file is part of PLplot. + This file is part of PLplot. - PLplot is free software you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation either version 2 of the License, or - (at your option) any later version. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with PLplot if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end - - ---------------------------------------------------------------------------- -- cmap1_init1 -- Modified: trunk/examples/lua/x09.lua =================================================================== --- trunk/examples/lua/x09.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x09.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -2,33 +2,28 @@ Contour plot demo. - This file is part of PLplot. + Copyright (C) 2008 Werner Smekal - PLplot is free software you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation either version 2 of the License, or - (at your option) any later version. + This file is part of PLplot. - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. - You should have received a copy of the GNU Library General Public License - along with PLplot if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('plplotluac.dll','luaopen_plplotluac') or loadlib('plplotluac.so','luaopen_plplotluac') - assert(lib)() -else - require('example') -end - - XPTS = 35 -- Data points in x YPTS = 46 -- Data points in y Modified: trunk/examples/lua/x10.lua =================================================================== --- trunk/examples/lua/x10.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x10.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,15 +1,30 @@ --- $Id$ +--[[ $Id$ --- Window positioning demo. + Window positioning demo. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + + ---------------------------------------------------------------------------- -- main -- Modified: trunk/examples/lua/x11.lua =================================================================== --- trunk/examples/lua/x11.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x11.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -2,35 +2,28 @@ Mesh plot demo. - Copyright (C) 2004 Rafael Laboissiere + Copyright (C) 2008 Werner Smekal - This file is part of PLplot. + This file is part of PLplot. - PLplot is free software you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation either version 2 of the License, or - (at your option) any later version. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with PLplot if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end - - XPTS = 35 -- Data points in x YPTS = 46 -- Data points in y LEVELS = 10 Modified: trunk/examples/lua/x12.lua =================================================================== --- trunk/examples/lua/x12.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x12.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,15 +1,29 @@ --- $Id$ +--[[ $Id$ --- Bar chart demo. + Bar chart demo. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + function pl.fbox(x0, y0) x = {} y = {} Modified: trunk/examples/lua/x13.lua =================================================================== --- trunk/examples/lua/x13.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x13.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,15 +1,29 @@ --- $Id$ +--[[ $Id$ --- Pie chart demo. + Pie chart demo. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + text = { "Maurice", "Geoffrey", "Alan", "Rafael", "Vince" } Modified: trunk/examples/lua/x15.lua =================================================================== --- trunk/examples/lua/x15.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x15.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,16 +1,29 @@ --- $Id$ +--[[ $Id$ --- Shade plot demo. + Shade plot demo. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + XPTS = 35 -- Data points in x YPTS = 46 -- Data points in y Modified: trunk/examples/lua/x16.lua =================================================================== --- trunk/examples/lua/x16.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x16.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,16 +1,29 @@ --- $Id$ +--[[ $Id$ --- plshade demo, using color fill. + plshade demo, using color fill. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + -- Fundamental settings. See notes[] for more info. ns = 20 -- Default number of shade levels nx = 35 -- Default number of data points in x Modified: trunk/examples/lua/x18.lua =================================================================== --- trunk/examples/lua/x18.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x18.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,17 +1,29 @@ --- $Id$ +--[[ $Id$ --- 3-d line and point plot demo. Adapted from x08c.c. + 3-d line and point plot demo. Adapted from x08c.c. + Copyright (C) 2008 Werner Smekal --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + function test_poly(k) draw= { { 1, 1, 1, 1 }, { 1, 0, 1, 0 }, Modified: trunk/examples/lua/x19.lua =================================================================== --- trunk/examples/lua/x19.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x19.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,17 +1,30 @@ --- $Id$ +--[[ $Id$ --- Illustrates backdrop plotting of world, US maps. --- Contributed by Wesley Ebisuzaki. + Illustrates backdrop plotting of world, US maps. + Contributed by Wesley Ebisuzaki. + Copyright (C) 2008 Werner Smekal --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + This file is part of PLplot. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + -------------------------------------------------------------------------- -- mapform19 -- Modified: trunk/examples/lua/x22.lua =================================================================== --- trunk/examples/lua/x22.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x22.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,37 +1,29 @@ --[[ $Id$ - Simple vector plot example - Copyright (C) 2004 Andrew Ross <and...@us...> - Copyright (C) 2004 Rafael Laboissiere + Simple vector plot example + Copyright (C) 2008 Werner Smekal - This file is part of PLplot. + This file is part of PLplot. - PLplot is free software you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation either version 2 of the License, or - (at your option) any later version. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with PLplot if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end - - -- Pairs of points making the line segments used to plot the user defined arrow arrow_x = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 } arrow_y = { 0, 0, 0.2, 0, -0.2, 0 } Modified: trunk/examples/lua/x24.lua =================================================================== --- trunk/examples/lua/x24.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x24.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,26 +1,25 @@ ---[[ - Unicode Pace Flag +--[[ $Id$ - Copyright (C) 2005 Rafael Laboissiere + Unicode Pace Flag + Copyright (C) 2008 Werner Smekal - This file is part of PLplot. + This file is part of PLplot. - PLplot is free software you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation either version 2 of the License, or - (at your option) any later version. + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with PLplot if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - In Debian, run like this: ( TTFDIR=/usr/share/fonts/truetype \ @@ -40,16 +39,9 @@ ttf-bengali-fonts --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end - - red = { 240, 204, 204, 204, 0, 39, 125 } green = { 240, 0, 125, 204, 204, 80, 0 } blue = { 240, 0, 0, 0, 0, 204, 125 } Modified: trunk/examples/lua/x25.lua =================================================================== --- trunk/examples/lua/x25.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x25.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,15 +1,29 @@ --- $Id$ +--[[ $Id$ --- Filling and clipping polygons. + Filling and clipping polygons. --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end + Copyright (C) 2008 Werner Smekal + This file is part of PLplot. + + PLplot is free software you can redistribute it and/or modify + it under the terms of the GNU General Library Public License as published + by the Free Software Foundation either version 2 of the License, or + (at your option) any later version. + + PLplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with PLplot if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--]] + +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") + -------------------------------------------------------------------------- -- main -- Modified: trunk/examples/lua/x30.lua =================================================================== --- trunk/examples/lua/x30.lua 2009-01-29 08:38:36 UTC (rev 9413) +++ trunk/examples/lua/x30.lua 2009-01-29 22:48:54 UTC (rev 9414) @@ -1,38 +1,29 @@ ---[[ - Alpha color values demonstration. +--[[ $Id$ - Copyright (C) 2008 Hazen Babcock + Alpha color values demonstration. + Copyright (C) 2008 Werner Smekal This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify + + PLplot is free software you can redistribute it and/or modify it under the terms of the GNU General Library Public License as published - by the Free Software Foundation; either version 2 of the License, or + by the Free Software Foundation either version 2 of the License, or (at your option) any later version. - + PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of + but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. - + You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software + along with PLplot if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - This example will only really be interesting when used with devices that - support or alpha (or transparency) values, such as the cairo device family. --]] +-- initialise Lua bindings for PLplot examples. +dofile("plplot_examples.lua") --- initialise Lua bindings to PLplot -if string.sub(_VERSION,1,7)=='Lua 5.0' then - lib=loadlib('./plplotluac.so','luaopen_plplotluac') or loadlib('plplotluac.dll','luaopen_plplotluac') - assert(lib)() -else - require('plplotluac') -end - red = { 0, 255, 0, 0 } green = { 0, 0, 255, 0 } blue = { 0, 0, 0, 255 } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |