PDL — Scientific Programming in Perl

Total Page:16

File Type:pdf, Size:1020Kb

PDL — Scientific Programming in Perl PDL | Scientific Programming in Perl Karl Glazebrook Christian S¨oller Tuomas J. Lukka Marc Lehmann Jarle Brinchmann Doug Hunt John Cerney Robin Williams Tim Pickering August 12, 2001 Contents 0 PDL | Year Zero 5 0.1 Who this book is for. 6 0.2 The case for a high-level approach. 7 0.3 The case for a free Data Language. 8 0.4 So why Perl? . 9 0.5 What this book is about. 11 0.6 What this book is NOT about. 11 0.7 Conventions used in this book . 12 1 A Whirlwind tour through PDL 13 1.1 Alright let's do something. 13 1.2 Whirling through the Whirlpool . 16 1.2.1 Measuring the brightness of M51 . 20 1.2.2 Twinkle, twinkle, little star. 21 1.2.3 Getting Complex with M51 . 28 1.3 Roundoff . 29 2 The Basics of PDL 31 2.1 Basic manipulations of piddles . 31 2.1.1 What is a piddle? . 31 2.1.2 Creating piddles . 32 2.1.3 Elementary arithmetic. 33 2.1.4 In-place arithmetic . 34 2.1.5 Using = and .= . 34 2.2 Piddles are NOT Perl `arrays' . 35 1 CONTENTS 2 2.2.1 The benefits of piddles. 37 2.2.2 Lists and Hashes of piddles . 37 2.3 PDL Datatypes . 38 2.3.1 Type conversion and creation . 39 2.3.2 Complex types . 39 2.4 PDL projection operators . 40 2.4.1 What about projecting along other dimensions? . 41 2.5 `Threading' over extra dimensions. 41 2.6 Example Problem . 43 3 Slicing, Dicing and Threading with PDL dimensions 44 3.1 Finding piddle dimensions. 45 3.2 The slice function | regular subsets along axes . 45 3.2.1 The basic slicing specification. 45 3.2.2 Modifying slices. 46 3.2.3 Does a slice consume memory? . 47 3.2.4 Advanced slice syntax . 48 3.2.5 PDL's Method notation . 48 3.3 The dice and dice_axis functions | irregular subsets along axes 49 3.4 Using mv, xchg and reorder | transposing dimensions . 50 3.5 Combining dimensions with clump . 50 3.6 Adding dimensions with dummy ................... 52 3.7 Completely general subsets of data with index, which and where 53 3.8 Example Problem . 55 3.9 PDL threading and signatures . 55 3.9.1 Threading . 56 3.9.2 A simple example . 56 3.9.3 Why bother . 58 3.9.4 More examples . 58 3.9.5 Why threading and why call it threading? . 60 3.9.6 The general case: PDL functions and their signature . 63 3.9.7 You can write your own threading routines . 67 3.9.8 Matching threading dimensions . 68 3.9.9 Promotion: When a piddle has less dimensions than required 72 CONTENTS 3 3.9.10 Calling conventions and tight loops . 72 3.9.11 Manipulating indices | generalised slicing . 72 3.9.12 Memory and speed implications | Vaffines . 72 3.9.13 writing your own threading aware function | at the perl level! . 72 3.9.14 A worked example . 72 3.9.15 explicit threading for complex cases . 73 4 Graphics with PDL 74 4.1 Introduction . 74 4.2 2-dimensional graphics using PGPLOT . 75 4.3 Introducing PDL::Graphics::PGPLOT . 75 4.4 An overview of 2D plotting commands . 77 4.4.1 Setting up the plot area . 77 4.4.2 Drawing lines and plotting points . 78 4.4.3 Displaying images . 79 4.4.4 Contour plots and vector fields . 81 4.4.5 Using colour . 82 4.4.6 Using PGPLOT commands directly . 83 4.4.7 Plotting commands . 84 4.5 Plot command reference . 85 4.5.1 General options . 85 4.5.2 Graphics commands in PDL::Graphics::PGPLOT . 87 4.6 3D Graphics with OpenGL . 90 4.6.1 Introduction . 90 4.6.2 Parametric Graphics . 91 4.6.3 Types of 3D Graphical Objects . 93 4.6.4 More than one Image . 95 4.6.5 Animation . 97 4.6.6 Putting it all together | cool hacks . 97 4.6.7 The VRML backend . 99 4.7 Pixel manipulations using the Gimp . 100 4.7.1 The components of Gimp . 100 4.7.2 Direct pixel access . 100 CONTENTS 4 4.7.3 Gimp Plug-Ins . 100 4.7.4 More Information . 101 6 Advanced Examples of Using PDL 102 6.1 A PDL weather map . 102 6.1.1 Drawing the map . 102 6.1.2 Getting the weather data . 104 6.1.3 Plotting the contour map . 105 6.1.4 What happened? . 106 6.2 Objects using PDL - defining your own data types . 109 6.2.1 Implementing derived classes: The Complex module . 110 6.3 Numerical simulations in PDL . 116 6.3.1 The wave equation . 116 6.3.2 Multiple dimensions and higher order . 120 6.3.3 Gas dynamics . 126 6.3.4 Ordinary Differential Equations . 126 Chapter 0 PDL | Year Zero "Why is it that we entertain the belief that for every purpose odd numbers are the most effectual?” - Pliny the Elder. The PDL project began in February 1996, when I decided to experiment with writing my own `Data Language'. I am an astronomer. My day job involves a lot of analysis of digital data accumualated on many nights observing on telescopes around the world. Such data might for example be images containing millions of pixels and thousands of images of distant stars and galaxies. Or more abstrusely, many hundreds of digital spectral revealing the secrets of the composition and propertues of these distant objects. Obviously many astronomers before have dealt with these problems, and a large amount of software has been constructed to facilitate their analysis. However, like many of my colleagues, I was constantly frustrated by the lack of generality and flexibility of these programs and the difficulty of doing anything out of the ordinary quickly and easily. What I wanted had a name: `Data Language', i.e. a language which allowed the manipulation of large amounts of data with simple arithmetic expressions. In fact some commericial software worked like this, and I was impressed with the capabilities but not with the price tag. And I thought I could do better. As a fairly computer literate astronomer (read `nerd' or `geek' according to your local argot) I was very familiar with `Perl', a computer language which now seems to fill the shelves of many bookstores around the world. I was impressed by it's power and flexibility, and especially it's ease of use. I had even explored the depths of it's internals and written an interface to allow graphics (the PGPLOT module1). The ease with which I could then create charts and graphs, for my papers, was refreshing. 1The PGPLOT module for perl is an interface to the pgplot graphics library (written in C and Fortran) created by Tim Pearson of Caltech. More information about this library can be obtained from: http://astro.caltech.edu/~tjp/pgplot/ 5 CHAPTER 0. PDL | YEAR ZERO 6 Version 5 of Perl had just been released, and I was fascinated by the new fea- tures available. Especially the support of arbitrary data structures (or `objects' in modern parlance) and the ability to `overload' operators | i.e. make math- ematical symbols like +-*/ do whatever you felt like. It seemed to me it ought to be possible to write an extension to Perl where I could play with my data in a general way: for example using the maths operators manipulate whole images at once. Well one slow night at an observatory I just thought I would try a little exper- iment. In a bored moment I fired up a text editor and started to create a file called `PDL.xs' | a Perl extension module to manipulate data vectors. A few hours later I actually had something half decent working, where I could add two images in the Perl language, fast! This was something I could not let rest, and it probably cost me one or two scientific papers worth of productivity. A few weeks later the Perl Data Language version 1.0 was born. It was a pretty bare infant: very little was there apart from the basic arithmetic operators. But encouraged I made it available on the Internet to see what people thought. Well people were fairly critical | among the most vocal were Tuomas Lukka and Christian Soeller. Unfortunately for them they were both Perl enthusiasts too and soon found themselves improving my code to implement all the features they thought PDL ought to have and I had heinously neglected. PDL is a prime example of that modern phenomenon of authoring large free software packages via the Internet. Large numbers of people, most of whom have never met, have made contributions ranging for core functionality to large modules to the smallest of bug patches. PDL version 2.0 is now here (though it should perhaps have been called version 10 to reflect the amount of growth in size and functionality) and the phenomenon continues. I firmly believe that PDL is a great tool for tackling general problems of data analysis. It is powerful, fast, easy to add too and freely available to anyone. I wish I had had it when I was a graduate student! I hope you too will find it of immense value, I hope it will save you from heaps of time and frustration in solving complex problems. Of course it can't do everything, but it provides the framework, the hammers and the nails for building solutions without having to reinvent wheels or levers.
Recommended publications
  • EGTDC Perl Course 2004
    EGTDC Perl Course 2004 Making use of CPAN modules Perl on other platforms Tim Booth : [email protected] Environmental Genomics Thematic Programme Data Centre http://envgen.nox.ac.uk CPAN Recap • "Comprehensive Perl Archive Network". • Holds virtually every Perl module, among other things. • Access via the web (http) and by the CPAN shell. – search.cpan.org is probably your first point of call. • Most modules are standardised to make them easy to use right away: – Documentation in ©perldoc© format. – Standard installation procedure – Self-testing Environmental Genomics Thematic Programme Data Centre http://envgen.nox.ac.uk CPAN and modules • CPAN contains around 2860 modules - bits of code that can be plugged into your scripts. Some are small, some complex. • Need to interface with a database? Use the DBI/DBD modules. • Need to make webpages with Perl? Use the CGI module. • Need to make a graphical interface? Use the Tk module. • Need to do bioinformatics? Use the BioPerl modules! • To use an installed module you "use module_name;" in the same way as you "use strict;" • Modules can be installed in 2 ways – Manually, from source – From CPAN, using the CPAN shell. Environmental Genomics Thematic Programme Data Centre http://envgen.nox.ac.uk Installing modules from source • On Bio-Linux, log in as manager to install modules system-wide • Modules are distributed as .tar.gz files. • Download the module to the manager©s home directory. • if you are missing components required for the module to work you will be told at the 2nd step below. • Always check README or INSTALL files before installing.
    [Show full text]
  • Scaling a Content Delivery System for Open Source Software
    Scaling a Content Delivery system for Open Source Software Niklas Edmundsson May 25, 2015 Master’s Thesis in Computing Science, 30 credits Supervisor at CS-UmU: Per-Olov Ostberg¨ Examiner: Fredrik Georgsson Ume˚a University Department of Computing Science SE-901 87 UMEA˚ SWEDEN Abstract This master’s thesis addresses scaling of content distribution sites. In a case study, the thesis investigates issues encountered on ftp.acc.umu.se,acontentdistributionsiterun by the Academic Computer Club (ACC) of Ume˚aUniversity. Thissiteischaracterized by the unusual situation of the external network connectivity having higher bandwidth than the components of the system, which differs from the norm of the external con- nectivity being the limiting factor. To address this imbalance, a caching approach is proposed to architect a system that is able to fully utilize the available network capac- ity, while still providing a homogeneous resource to the end user. A set of modifications are made to standard open source solutions to make caching perform as required, and results from production deployment of the system are evaluated. In addition, time se- ries analysis and forecasting techniques are introduced as tools to improve the system further, resulting in the implementation of a method to automatically detect bursts and handle load distribution of unusually popular files. Contents 1Introduction 1 2Background 3 3 Architecture analysis 5 3.1 Overview ................................... 5 3.2 Components . 7 3.2.1 mod cache disk largefile - Apache httpd disk cache . 8 3.2.2 libhttpcacheopen - using the httpd disk cache for otherservices. 9 3.2.3 redirprg.pl-redirectionsubsystem . ... 10 3.3 Results....................................
    [Show full text]
  • “Computer Programming IV” As Capstone Design and Laboratory Attachment Shoichi Yokoyama† Yamagata University, Yonezawa, Japan
    Journal of Engineering Education Research Vol. 15, No. 5, pp. 31~35, September, 2012 “Computer Programming IV” as Capstone Design and Laboratory Attachment Shoichi Yokoyama† Yamagata University, Yonezawa, Japan ABSTRACT A new obligatory subject, Computer Programming IV, is organized in the Department of Informatics, Faculty of Engineering, Yamagata University. The purposes of the subject are as follows: (1) Attachment to each laboratory for bachelor thesis was usually at the initial stage of the student’s fourth academic year. This subject actually moves up the attachment because students are tentatively attached to a laboratory for this subject. The interval to complete their bachelor thesis is extended by half a year. (2) In each laboratory, students cooperate with each other to complete their project. The project becomes capstone design which JABEE (Japan Accreditation Board for Engineering Education) is recently emphasizing. We not only explain the introduction of this subject, but also report some case studies. Keywords: Engineering education, Capstone design, Laboratory attachment, Project, JABEE I. Introduction 1) third academic year, so that students first took the subject in 2009. The detailed plan created before this first use is The education program of the Department of Informatics, described in [2]. Faculty of Engineering, Yamagata University (YUDI) was The present paper describes the syllabus and proceeds accredited in 2003 by Japan Accreditation Board for to describe case studies of some laboratories. We explain Engineering Education (JABEE) [1], the second to be three years of results. accredited for information engineering. Through the in- Computer Programming IV has the following two purposes: termediate examination in 2005, the program was re- accredited in 2008 for the 2009 to 2014 period.
    [Show full text]
  • Object-Oriented Virtual Sample Library: a Container of Multi-Dimensional Data for Acquisition, Visualization and Sharing
    Object-oriented virtual sample library: a container of multi-dimensional data for acquisition, visualization and sharing Shin-ichi Todoroki y Advanced Materials Laboratory, National Institute for Materials Science, Namiki 1-1, Tsukuba, Ibaraki 305-0044, JAPAN Abstract. Combinatorial methods bring about enormous data not only in size but also in dimension. To handle multi-dimensional data easily, a concept of virtual container for combinatorially acquired data is demonstrated which is called “virtual sample library” (VSL). VSL stores the data hierarchically in the order of (1) coordinates in the sample library, (2) names of the measurements performed, and (3) data obtained from each measurement. Thus, the stored data are accessed intuitively just by tracing this tree-like structure and are provided for visualization and sharing with others. This framework is constructed by the aid of an object-oriented scripting language which is good at abstracting complicated data structure. In this paper, after summarizing the problems of handling data acquired from combinatorially integrated samples and availabilities of software tools to solve them, the concept of VSL is proposed and its structure and functions are demonstrated on the basis of one specific experimental data. Its extensibility as a platform for numerical simulation is also discussed. PACS numbers: 07.05.Kf, 07.05.Rm Received 12 April 2004, in final form 26 July 2004 Published 16 December 2004 Meas. Sci. Technol. , 16, 1, pp. 285-291 (2005). [ c 2005 IOP Publishing Ltd] ° http://dx.doi.org/10.1088/0957-0233/16/1/037 http://www.geocities.com/Tokyo/1406/node2.html#Todoroki05MST285 1. Introduction We can enjoy the benefit of combinatorial technology only after we can afford to analyze the large amount of data obtained.
    [Show full text]
  • Scripting and Visualization
    Scripting and Visualization ● ScriptingScripting – PythonPython basics (Peter Teuben) – IDLIDL basics (GDL) (Mark Vogelsberger) ● VisualizationVisualization – Python::Matplotlib, tvtk, mayavi (Matthew Turk) – Vis5d , IDL widgets (Anatoly Spitkovsky) – PovRay, SecondLife (Derek Richardson) – Visit (Chris Lindner) – OpenGL (Hanno Rein) S&V questions ● S: Is speed important? ● V: Specific for one type of data (point vs. grid, 1-2-3-dim?) ● V: Can it be driven by external programs (ds9, paraview) ● V: Can it be scripted? (partiview) ● V: Can it make animations? (glnemo2) ● V: Installation dependancies? Hard to install? Scripting (leaving out bash/tcsh) ● Scheme ((((((= a 1)))))) ● Perl $^_a! ● Tcl/Tk [set x [foo [bar]]] ● Python a.trim().split(':')[5] ● Ruby @a = (1,2,3) ● Cint struct B { float x[3], v[3];} ● IDL wh = where(r(delm) EQ 0, ct) ● Matlab t=r(:,1)+r(:,2)/60+r(:,3)/3600; PYTHONPYTHON http://www.python.org What's all the hype about? ● 1990 at UvA by Guido van Rossum ● Open Source, in C, portable Linux/Mac/Win/... ● Interpreted and dynamic scripting language ● Extensible and Object Oriented – Modules in python itself – Modules to any language (C, Fortran, ...) ● Many libraries have interfaces: gsl, fitsio, hdf5, pgplot,.... ● SciPy environment (numerical, plotting) The Language http://docs.python.org/tutorial ● Types: – Scalars: X=1 X=”1 2 3” – Lists: X=[1,2,3] X=range(1,4) – Tuples: X=(1,2,3,'-1','-2','-3') vx=float(X[3]) – Dictionary: X={“nbody”:10, “mode”:”euler”, “eps”:0.05} X[“eps”] ● Lots of builtin functions (and modules)
    [Show full text]
  • Learning Perl. 5Th Edition [PDF]
    Learning Perl ,perlroadmap.24755 Page ii Tuesday, June 17, 2008 8:15 AM Other Perl resources from O’Reilly Related titles Advanced Perl Programming Perl Debugger Pocket Intermediate Perl Reference Mastering Perl Perl in a Nutshell Perl 6 and Parrot Essentials Perl Testing: A Developer’s Perl Best Practices Notebook Perl Cookbook Practical mod-perl Perl Books perl.oreilly.com is a complete catalog of O’Reilly’s books on Perl Resource Center and related technologies, including sample chapters and code examples. Perl.com is the central web site for the Perl community. It is the perfect starting place for finding out everything there is to know about Perl. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and ITprofessionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today with a free trial. main.title Page iii Monday, May 19, 2008 11:21 AM FIFTH EDITION LearningTomcat Perl™ The Definitive Guide Randal L. Schwartz,Jason Tom Brittain Phoenix, and and Ian brian F. Darwin d foy Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Learning Perl, Fifth Edition by Randal L.
    [Show full text]
  • Effective Perl Programming
    Effective Perl Programming Second Edition The Effective Software Development Series Scott Meyers, Consulting Editor Visit informit.com/esds for a complete list of available publications. he Effective Software Development Series provides expert advice on Tall aspects of modern software development. Books in the series are well written, technically sound, and of lasting value. Each describes the critical things experts always do—or always avoid—to produce outstanding software. Scott Meyers, author of the best-selling books Effective C++ (now in its third edition), More Effective C++, and Effective STL (all available in both print and electronic versions), conceived of the series and acts as its consulting editor. Authors in the series work with Meyers to create essential reading in a format that is familiar and accessible for software developers of every stripe. Effective Perl Programming Ways to Write Better, More Idiomatic Perl Second Edition Joseph N. Hall Joshua A. McAdams brian d foy Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
    [Show full text]
  • Abkürzungs-Liste ABKLEX
    Abkürzungs-Liste ABKLEX (Informatik, Telekommunikation) W. Alex 1. Juli 2021 Karlsruhe Copyright W. Alex, Karlsruhe, 1994 – 2018. Die Liste darf unentgeltlich benutzt und weitergegeben werden. The list may be used or copied free of any charge. Original Point of Distribution: http://www.abklex.de/abklex/ An authorized Czechian version is published on: http://www.sochorek.cz/archiv/slovniky/abklex.htm Author’s Email address: [email protected] 2 Kapitel 1 Abkürzungen Gehen wir von 30 Zeichen aus, aus denen Abkürzungen gebildet werden, und nehmen wir eine größte Länge von 5 Zeichen an, so lassen sich 25.137.930 verschiedene Abkür- zungen bilden (Kombinationen mit Wiederholung und Berücksichtigung der Reihenfol- ge). Es folgt eine Auswahl von rund 16000 Abkürzungen aus den Bereichen Informatik und Telekommunikation. Die Abkürzungen werden hier durchgehend groß geschrieben, Akzente, Bindestriche und dergleichen wurden weggelassen. Einige Abkürzungen sind geschützte Namen; diese sind nicht gekennzeichnet. Die Liste beschreibt nur den Ge- brauch, sie legt nicht eine Definition fest. 100GE 100 GBit/s Ethernet 16CIF 16 times Common Intermediate Format (Picture Format) 16QAM 16-state Quadrature Amplitude Modulation 1GFC 1 Gigabaud Fiber Channel (2, 4, 8, 10, 20GFC) 1GL 1st Generation Language (Maschinencode) 1TBS One True Brace Style (C) 1TR6 (ISDN-Protokoll D-Kanal, national) 247 24/7: 24 hours per day, 7 days per week 2D 2-dimensional 2FA Zwei-Faktor-Authentifizierung 2GL 2nd Generation Language (Assembler) 2L8 Too Late (Slang) 2MS Strukturierte
    [Show full text]
  • Mojolicious Web Clients Brian D Foy Mojolicious Web Clients by Brian D Foy
    Mojolicious Web Clients brian d foy Mojolicious Web Clients by brian d foy Copyright 2019-2020 © brian d foy. All rights reserved. Published by Perl School. ii | Table of contents Preface vii What You Should Already Know . viii Some eBook Notes ........................... ix Installing Mojolicious ......................... x Getting Help .............................. xii Acknowledgments . xiii Perl School ............................... xiv Changes ................................. xiv 1 Introduction 1 The Mojo Philosophy .......................... 1 Be Nice to Servers ........................... 4 How HTTP Works ........................... 6 Add to the Request ........................... 15 httpbin ................................. 16 Summary ................................ 18 2 Some Perl Features 19 Perl Program Basics .......................... 19 Declaring the Version ......................... 20 Signatures ................................ 22 Postfix Dereference ........................... 25 Indented Here Docs ........................... 25 Substitution Returns the Modified Copy . 26 Summary ................................ 27 3 Basic Utilities 29 Working with URLs .......................... 30 Decoding JSON ............................. 34 Collections ............................... 45 Random Utilities ............................ 50 TABLE OF CONTENTS | iii Events .................................. 52 Summary ................................ 55 4 The Document Object Model 57 Walking Through HTML or XML ................... 57 Modifying
    [Show full text]
  • Mastering Algorithms with Perl
    Page iii Mastering Algorithms with Perl Jon Orwant, Jarkko Hietaniemi, and John Macdonald Page iv Mastering Algorithms with Perl by Jon Orwant, Jarkko Hietaniemi. and John Macdonald Copyright © 1999 O'Reilly & Associates, Inc. All rights reserved. Printed in the United States of America. Cover illustration by Lorrie LeJeune, Copyright © 1999 O'Reilly & Associates, Inc. Published by O'Reilly & Associates, Inc., 101 Morris Street, Sebastopol, CA 95472. Editors: Andy Oram and Jon Orwant Production Editor: Melanie Wang Printing History: August 1999: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a wolf and the topic of Perl algorithms is a trademark of O'Reilly & Associates, Inc. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 1-56592-398-7 [1/00] [M]]break Page v Table of Contents Preface xi 1. Introduction 1 What Is an Algorithm? 1 Efficiency 8 Recurrent Themes in Algorithms 20 2. Basic Data Structures 24 Perl's Built-in Data Structures 25 Build Your Own Data Structure 26 A Simple Example 27 Perl Arrays: Many Data Structures in One 37 3.
    [Show full text]
  • The Graphics Cookbook SC/15.2 —Abstract Ii
    SC/15.2 Starlink Project STARLINK Cookbook 15.2 A. Allan, D. Terrett 22nd August 2000 The Graphics Cookbook SC/15.2 —Abstract ii Abstract This cookbook is a collection of introductory material covering a wide range of topics dealing with data display, format conversion and presentation. Along with this material are pointers to more advanced documents dealing with the various packages, and hints and tips about how to deal with commonly occurring graphics problems. iii SC/15.2—Contents Contents 1 Introduction 3 2 Call for contributions 3 3 Subroutine Libraries 3 3.1 The PGPLOT library . 3 3.1.1 Encapsulated Postscript and PGPLOT . 5 3.1.2 PGPLOT Environment Variables . 5 3.1.3 PGPLOT Postscript Environment Variables . 5 3.1.4 Special characters inside PGPLOT text strings . 7 3.2 The BUTTON library . 7 3.3 The pgperl package . 11 3.3.1 Argument mapping – simple numbers and arrays . 12 3.3.2 Argument mapping – images and 2D arrays . 13 3.3.3 Argument mapping – function names . 14 3.3.4 Argument mapping – general handling of binary data . 14 3.4 Python PGPLOT . 14 3.5 GLISH PGPLOT . 15 3.6 ptcl Tk/Tcl and PGPLOT . 15 3.7 Starlink/Native PGPLOT . 15 3.8 Graphical Kernel System (GKS) . 16 3.8.1 Enquiring about the display . 16 3.8.2 Compiling and Linking GKS programs . 17 3.9 Simple Graphics System (SGS) . 17 3.10 PLplot Library . 17 3.10.1 PLplot and 3D Surface Plots . 18 3.11 The libjpeg Library . 19 3.12 The giflib Library .
    [Show full text]
  • Documentation of the Plplot Plotting Software I
    Documentation of the PLplot plotting software i Documentation of the PLplot plotting software Documentation of the PLplot plotting software ii Copyright © 1994 Maurice J. LeBrun, Geoffrey Furnish Copyright © 2000-2005 Rafael Laboissière Copyright © 2000-2016 Alan W. Irwin Copyright © 2001-2003 Joao Cardoso Copyright © 2004 Andrew Roach Copyright © 2004-2013 Andrew Ross Copyright © 2004-2016 Arjen Markus Copyright © 2005 Thomas J. Duck Copyright © 2005-2010 Hazen Babcock Copyright © 2008 Werner Smekal Copyright © 2008-2016 Jerry Bauck Copyright © 2009-2014 Hezekiah M. Carty Copyright © 2014-2015 Phil Rosenberg Copyright © 2015 Jim Dishaw Redistribution and use in source (XML DocBook) and “compiled” forms (HTML, PDF, PostScript, DVI, TeXinfo and so forth) with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code (XML DocBook) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. 2. Redistributions in compiled form (transformed to other DTDs, converted to HTML, PDF, PostScript, and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Important: THIS DOCUMENTATION IS PROVIDED BY THE PLPLOT PROJECT “AS IS” AND ANY EXPRESS OR IM- PLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PLPLOT PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    [Show full text]