Graphics, in Particular Plotting Data

Total Page:16

File Type:pdf, Size:1020Kb

Graphics, in Particular Plotting Data Graphics, in particular plotting data Alan BRASLAU Service de physique de l’état condensé, CEA/Saclay, France Bassange – 20/09/2011 Why pay taxes? 3D graphics are sexy! Graphics, in particular plotting data 2 1. External graphics Produced using your favorite external program… Usage: \externalfigure [filename][option=val] file formats: pdf, mps, jpg jpeg, jp2, png, jbig jbig2 jb2, j j j svg svgz, eps, ai, gif, tif tiff, mov, flv, mp4, (but not avi), j j tex, cld, … automatically converted using external programs such as ghostscript, imageMagick, graphicsMagick, inkscape, etc. (if available). advantage: use of your tried and true external programs that you know and love… disadvantage: poor control of style, fonts, font size, colors, line weights, etc.; possible/probable inconsistencies between figures. Graphics, in particular plotting data 3 2. TEX-friendly graphics A. ‘external’ programs (or macros) METAPOST PSTricks, PiCTeX, TikZ, matplotlib (python), asymptote, R, gnuplot, … More or less well integrated in ConTEXt; more or less TEX-friendly. METAPOST B. MetaFun: graphics well integrated in ConTEXt Usage: \startMPcode … \stopMPcode \startuseMPgraphic{label} … \stopuseMPgraphic Graphics, in particular plotting data 4 http://www.pragma-ade.com/general/manuals/metafun-p.pdf Also available on paper, bound, for 49.00 € from www.h2o-books.com 375 pages. context mkiv Hans Hagen metafun Graphics, in particular plotting data 5 texlive/2011/texmf-dist/doc/metapost/base/mpman.pdf METAPOST a user’s manual John D. Hobby and the MetaPost development team documented version: 1.504 April 5, 2011 Graphics, in particular plotting data 6 TikZ (vs. MetaFun) TikZ (built upon PGF) is a METAPOST-inspired graphics language. More and more popular with LATEX users, it has always functioned well under ConTEXt. Its great strength is a & & PGF Z k very well written tutorial and TikZ PGF manual; it is rich in features Manual for Version 2.10 2.10 and has many extras (such as Manual for Version pgfplots, pgfgantt, tikz-3dplot, \begin{tikzpicture} \nodeshadowed [at={(-5,8 )},yslant=0.05] and more). coordinate front at Huge Ti textcolor orange emph k Z \ ( ) (0,0); {\ \ { }{\ { }} }; \coordinate (horizon) at (0,.31\paperheight); \nodeshadowed [at={( 0,8.3)}] \coordinate (bottom) at (0,-.6\paperheight); {\huge \textcolor{green!50!black!50}{\&}}; \coordinate (sky) at (0,.57\paperheight); \nodeshadowed [at={( 5,8 )},yslant=-0.05] \coordinate (left) at (-.51\paperwidth,0); {\Huge \textsc{PGF}}; \coordinate (right) at (.51\paperwidth,0); \nodeshadowed [at={( 0,5 )}] {Manual for Version \pgftypesetversion}; \shade [bottom color=white, top color=blue!30!black!50] \foreach \where in {-9cm,9cm}{ ([yshift=-5mm]horizon - j left) \nodeshadowed [at={(\where,5cm)}] { \tikz rectangle (sky - j right); \draw [green!20!black, rotate=90, l-system={rule set={F -> FF-[-F+F]+[+F-F]}, However, its syntax is more \shade [bottom color=black!70!green!25, axiom=F, order=4,step=2pt, top color=black!70!green!10] randomize step percent=50, angle=30, (front - j left) -- (horizon - j left) randomize angle percent=5}] l-system; }} decorate [decoration=random steps]{ -- (horizon - j right)} \foreach \i in {0.5,0.6,...,2} -- (front - j right) -- cycle; \fill in the spirit of L T X then [white,opacity=\i/2, A \shade [top color=black!70!green!25, decoration=Koch snowflake, E bottom color=black!25] shift=(horizon),shift={(rand∗11,rnd∗7)}, ([yshift=-5mm-1pt]front - j left) scale=\i,double copy shadow={ rectangle ([yshift=1pt]front - j right); opacity=0.2,shadow xshift=0pt, shadow yshift=3∗\i pt,fill=white,draw=none}] \fill [black!25] decorate { ConT Xt (although this (bottom - j left) decorate { E rectangle ([yshift=-5mm]front - j right); decorate { (0,0)- ++(60:1) -- ++(-60:1) -- cycle \def\nodeshadowed[#1]#2;{ } } }; \node[scale=2,above,#1]{ \global\setbox\mybox=\hbox{#2} \node (left text) ... judgment is purely subjective \copy\mybox}; \node (right text) ... \node[scale=2,above,#1,yscale=-1, scope fading=south,opacity=0.4]{\box\mybox}; \fill [decorate,decoration={footprints,foot of=gnome}, } opacity=.5,brown](rand∗8,-rnd∗10) to [out=rand∗180,in=rand∗180] (rand∗8,-rnd∗10); and personal). \end{tikzpicture} Graphics, in particular plotting data 7 TikZ has a loyal following TikZ remains active (on the ConTEXt mailing list as well). Bugs in TikZ (introduced as ConTEXt evolves) get fixed quickly. However, The core use of TikZ is LATEX, and so it must remain compatible with the many flavors of LATEX. Calculations can be very slow. For example: “PGFPLOTS’ three dimensional routines are slow. There are reasons for this and some of them may vanish in future versions. … Besides the speed limitations, three dimensional plots reach memory limits easily. Therefore, the plot complexity of three dimensional plots is limited to relatively coarse resolutions.” These limitations remain true for all TikZ graphics. (Could TikZ evolve towards lualatex, or must it remain compatible with all LATEX motors?) Graphics, in particular plotting data 8 MetaFun is in the core of ConTEXt So, why do we ever consider using anything else? METAPOST has a steep learning-curve; METAPOST, although pretty well-documented, is perhaps lacking a good tutorial; MetaFun and METAPOST have been extended through many higher-level macro packages (such as graph and the chart module, just to name two that I sometimes use). We need more, for example, convenient ways to manipulate common graphical representations (such as diagrams, trees, etc.). Graphics, in particular plotting data 9 Drawing diagrams Suggestion/question: could the \framed macro be extended to be used in a way that is similar to what is called a node in TikZ: 1. absolute or relative placement on a canvas; 2. enclosure (and typeset) inside an arbitrary, closed path; 3. connected by various lines or arrows (using anchor points?) How do we get \startCANVAS from here \frame [start][frame=circle,width=3cm, backgroundcolor=green,foregroundcolor=white] {How do we get from here} \frame [stop][frame=hexagon,width=3cm, location=start.lrt, backgroundcolor=red,foregroundcolor=white] {to here?} \drawarrow [from=start,to=stop] to here? \stopCANVAS Graphics, in particular plotting data 10 What about plotting data? METAPOST graph macros crystalline helium (John D. Hobby) (100) (101) 1.001 (102) \usemodule [graph] (110) 0 (112) Q 2D (‘xy’) plotting of data / 1 Q 0.999 METAPOST (< 2.0) uses fixed point arithmetic. Much (100) (101) of the complication of the 1.001 (102) (110) graph macros arises from (112) 0 handling floating-point d 1 numbers. / d limitations in plotting ! very small and vary large 0.999 quantities (as well as very 0 0.5 1 1.5 small increments). T (K) Graphics, in particular plotting data 11 Mlog arithmetic x 216 The graph macros represent numbers in “Mlog” form, that is as µ · 24 where µ = e2− : − “A number x in Mlog form represents exp(x) if x is an even multiple of " and exp(x) if x is an odd multiple of ", 16 − where " = 2− [ 1.53e-5] is the basic unit for METAPOST’s ≈ fixpoint numbers. Such numbers can represent values large as 3.8877e+55 or as small as 1.604e-28 (anything less than that is treated as zero).” METAPOST 2.0 promises arbitrary precision, floating-point arithmetic. The graph macros can be rewritten (and greatly simplified). What about using lua? Think about the possibilities (easily achieved…). Graphics, in particular plotting data 12 Limitations in handling real data Currently, all but the most trivial manipulations of numerical data must be processed outside of METAPOST. One of my favorite tools is awk (or gawk which adds a few useful extensions). Awk is a very flexible, yet simple and robust interpreted language, using C-like syntax. In many ways, it shares much in common with lua. Another route, quite popular today, is python. Python is at the basis of the matplotlib package, and this solution is found to be quite satisfactory by many. Matplotlib uses a MATLAB-like syntax. Graphics, in particular plotting data 13 What is needed: 2D plots barcharts/histograms piecharts polar diagrams ternary diagrams contour plots 3D plots 3D surfaces (In general, a 3D extension to METAPOST would be desirable.) Graphics, in particular plotting data 14 3D METAPOST A 3D METAPOST macro package was developed by Denis Roegel. It is distributed with TEXlive under mp3d (and on CTAN, of course). \startMPcode input 3dgeom ; drawing_scale := 10cm ; vardef def_C(expr inst) = new_obj_points(inst,9) ; set_C_points(inst) ; enddef ; vardef set_C_points(expr inst) = set_point(1)(0,0,0) ; set_point(2)(0,0,1) ; set_point(3)(0,1,0) ; set_point(4)(0,1,1) ; set_point(5)(1,0,0) ; set_point(6)(1,0,1) ; set_point(7)(1,1,0) ; set_point(8)(1,1,1) ; set_point(9)(.5,.5.,.5) ; enddef ; vardef draw_C(expr inst) = draw_lines(1,2,4,3,1) ; draw_lines(5,6,8,7,5) ; draw_line(1,5) ; draw_line(2,6) ; draw_line(3,7) ; draw_line(4,8) ; enddef ; assign_obj("cube","C"); for i:=0 upto 10: if (i > 0) : picture pic ; pic := currentpicture ; currentpicture := nullpicture ; draw pic xshifted 1.65cm ; fi set_point_(Obs)(20*cosd(7.2*i),20*sind(7.2*i),6) ; Obs_phi := 90 ; Obs_dist := 2 ; point_of_view_obj("cube",8,Obs_phi) ; draw_obj("cube") ; endfor; \stopMPcode Graphics, in particular plotting data 15 Examples Cubic crystal lattices c bcc fcc polyhedra – 3dpoly Graphics, in particular plotting data 16 3d, 3dgeom, 3dpoly Handles vectors and polyhedra; Spheres, cylinders, cones, etc., planned, but not yet implemented; Could objects be defined in terms of a few basic 3D primitives rather then simply as a collection of indices? Handles different projection systems or perspectives (linear, parallel, oblique); A unique, global triplet of arrays stores the constituent points of all objects. The allocation (and freeing) of storage is a bit awkward. This could (easily?) be improved with some internal housekeeping.
Recommended publications
  • Seminar 'Typ 1 Aufgaben Qualitätsvoll Erstellen'
    Seminar ’Typ 1 Aufgaben qualitätsvoll erstellen’ Konzett, Weberndorfer LATEX in der Schule Oktober 2019 1 / 41 1 Bilder einfügen 2 Erstellen von GeoGebra Grafiken Konzett, Weberndorfer LATEX in der Schule Oktober 2019 2 / 41 1 Bilder einfügen 2 Erstellen von GeoGebra Grafiken Konzett, Weberndorfer LATEX in der Schule Oktober 2019 3 / 41 Bilder einfügen Bilder können über folgenden Befehl eingebettet werden: Konzett, Weberndorfer Bilder einfügen Oktober 2019 4 / 41 Bilder einfügen Bilder können über folgenden Befehl eingebettet werden: \includegraphics[width=0.5\textwidth]{Grafik.jpg} Konzett, Weberndorfer Bilder einfügen Oktober 2019 4 / 41 Bilder einfügen Bilder können über folgenden Befehl eingebettet werden: \includegraphics[width=0.5\textwidth]{Grafik.jpg} Wichtig: Die Bilder müssen in dem selben Ordner liegen wie die .tex-Datei (oder der Dateipfad muss angegeben werden) Konzett, Weberndorfer Bilder einfügen Oktober 2019 4 / 41 Bilder einfügen A Mit LTEX ⇒ PDF : Konzett, Weberndorfer Bilder einfügen Oktober 2019 5 / 41 Bilder einfügen A Mit LTEX ⇒ PDF : Einfügen von Standard-Grafikformaten möglich (.jpg, .png, .pdf,...) Konzett, Weberndorfer Bilder einfügen Oktober 2019 5 / 41 Bilder einfügen A Mit LTEX ⇒ PDF : Einfügen von Standard-Grafikformaten möglich (.jpg, .png, .pdf,...) Aber: Kein Einbetten von Geogebra-Grafiken möglich Konzett, Weberndorfer Bilder einfügen Oktober 2019 5 / 41 Bilder einfügen A Mit LTEX ⇒ PDF : Einfügen von Standard-Grafikformaten möglich (.jpg, .png, .pdf,...) Aber: Kein Einbetten von Geogebra-Grafiken möglich A
    [Show full text]
  • The Latex Graphics Companion / Michel Goossens
    i i “tlgc2” — 2007/6/15 — 15:36 — page iii — #3 i i The LATEXGraphics Companion Second Edition Michel Goossens Frank Mittelbach Sebastian Rahtz Denis Roegel Herbert Voß Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City i i i i i i “tlgc2” — 2007/6/15 — 15:36 — page iv — #4 i i 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 Addison-Wesley 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. The publisher offers discounts on this book when ordered in quantity for bulk purchases and special sales. For more information, please contact: U.S. Corporate and Government Sales (800) 382-3419 [email protected] For sales outside of the United States, please contact: International Sales [email protected] Visit Addison-Wesley on the Web: www.awprofessional.com Library of Congress Cataloging-in-Publication Data The LaTeX Graphics companion / Michel Goossens ... [et al.]. -- 2nd ed. p. cm. Includes bibliographical references and index. ISBN 978-0-321-50892-8 (pbk. : alk. paper) 1.
    [Show full text]
  • Graphics for Latex Users (Arstexnica, Numero 28, 2019)
    Graphics for LATEX users Agostino De Marco Abstract able, coherent, and visually satisfying whole that works invisibly, without the awareness of the reader. This article presents the most important ways to Typographers and graphic designers claim that an produce technical illustrations, diagrams and plots, A even distribution of typeset material and graphics, which are relevant to LTEX users. Graphics is a with a minimum of distractions and anomalies, is huge subject per se, therefore this is by no means aimed at producing clarity and transparency. This an exhaustive tutorial. And it should not be so is even more true for scientific or technical texts, since there are usually different ways to obtain where also precision and consistency are of the an equally satisfying visual result for any given utmost importance. graphic design. The purpose is to stimulate read- Authors of technical texts are required to be ers’ creativity and point them to the right direc- aware and adhere to all the typographical conven- tion. The article emphasizes the role of tikz for A tions on symbols. The most important rule in all programmed graphics and of inkscape as a LTEX- circumstances is consistency. This means that a aware visual tool. A final part on scientific plots given symbol is supposed to always be presented in presents the package pgfplots. the same way, whether it appears in the text body, a title, a figure, a table, or a formula. A number Sommario of fairly distinct subjects exist in the matter of typographical conventions where proven typeset- Questo articolo presenta gli strumenti più impor- ting rules have been established.
    [Show full text]
  • GCLC Manual and Help file and for Many Useful Insights and Com- Ments (2005); 88 D Acknowledgements
    GCLC 2020 (Geometry Constructions ! LATEX Converter) Manual Predrag Janiˇci´c Faculty of Mathematics Studentski trg 16 11000 Belgrade Serbia url: www.matf.bg.ac.rs/~janicic e-mail: [email protected] GCLC page: www.matf.bg.ac.rs/~janicic/gclc November 2020 c 1995-2020 Predrag Janiˇci´c 2 Contents 1 Briefly About GCLC5 1.1 Comments and Bugs Report.....................7 1.2 Copyright Notice...........................7 2 Quick Start9 2.1 Installation..............................9 2.2 First Example............................. 10 2.3 Basic Syntax Rules.......................... 11 2.4 Basic Objects............................. 11 2.5 Geometrical Constructions...................... 12 2.6 Basic Ideas.............................. 12 3 GCLC Language 15 3.1 Basic Definition Commands..................... 16 3.2 Basic Constructions Commands................... 16 3.3 Transformation Commands..................... 18 3.4 Calculations, Expressions, Arrays, and Control Structures.... 19 3.5 Drawing Commands......................... 23 3.6 Labelling and Printing Commands................. 29 3.7 Low Level Commands........................ 31 3.8 Cartesian Commands......................... 33 3.9 3D Cartesian Commands...................... 36 3.10 Layers................................. 39 3.11 Support for Animations....................... 40 3.12 Support for Theorem Provers.................... 40 4 Graphical User Interface 43 4.1 An Overview of the Graphical Interface.............. 43 4.2 Features for Interactive Work.................... 44 5 Exporting Options 49 5.1 Export to Simple LATEX format................... 49 5.1.1 Generating LATEX Files and gclc.sty ........... 50 5.1.2 Changing LATEX File Directly................ 50 5.1.3 Handling More Pictures on a Page............. 51 5.1.4 Batch Processing....................... 51 5.2 Export to PSTricks LATEX format.................. 52 5.3 Export to TikZLATEX format.................... 53 3 4 CONTENTS 5.4 Export to Raster-based Formats and Export to Sequences of Images 54 5.5 Export to eps Format.......................
    [Show full text]
  • Short Introduction to Pstricks
    Short introduction to PSTricks Tobias N¨ahring February 22, 2005 1 This presentation was held in German at the TEX-user-meeting Dresden (Germany) at June 12, 2004 (see also http://www.carstenvogel.de). The slides are shown here in a scaled-down version with minor changes and some explanations are added. A PSTricks is well suited to draw simple vector graphics inside of LTEX documents. The basic syntax of PSTricks is quite similar to that one of the A picture environment native to LTEX but the macros of PSTricks are in general much more comfortable and powerful. Even if PSTricks is rather powerful it should be emphasised that every program should be used for the task it is designed for. For an example, if you want to construct complicated realistic three-dimensional scenes you should better use some ray tracer1 (e. g. the freely available ray tracer povray). 1. even if less complicated three-dimensional scenes can be visualized with the help of the PSTricksadd-on vue3d 1-1 1 Sources • http://www.tug.org/applications/PSTricks/ Many, many examples. (Learning by doing.) • http://www.pstricks.de/ Ditto. • http://www.pstricks.de/docs.phtml PSTricks user guide: as one PDF, PSTricks quick reference card • Elke & Michael Niedermair, LATEX Praxisbuch, 2004, Franzis-Verlag, (Studienausgabe fur¨ 20c) 2 The original documentation of PSTricks written by Timothy van Zandt (the author of the base packages of PSTricks) is 100 pages long. Documenta- tions of add-ons for pstricks cover again hundreds of pages. From that fact, it is clear that this short presentation can only cover very few aspects of the PSTricks package.
    [Show full text]
  • The Ornaments Package Alain Matthes May 28, 2020
    The Ornaments package Alain Matthes May 28, 2020 (Version 1.2 2020/05/26) This document describes the LATEX package pgfornament and presents the syntax and parameters of the macro ”pgfornament”. It also provides examples and comments on the package’s use. Firstly, I would like to thank Till Tantau for the beautiful LATEX package, namely TikZ. I am grateful to Vincent Le Moign for allowing us to distribute the ornaments 1 in the format Pstricks and PGF/TikZ. 1 http://www.vectorian.net/ (free I also thank P. Fradin who first created a package on ornaments sample) in relation to PStricks, which gave me the idea to do the same thing in relation to TikZ. I would like to thank also Enrico Gregorio for some great ideas used in this package. You will find at the end of this document the 196 symbols provided with the package. With this new version comes a new family of ornaments. Chennan Zhang drew the motifs using a CAD application, re-drew them in TikZ, and granted permission for these to be turned into a library (pgfornament-han) suitable for use with the pgfornament package by LianTze Lim. It is now possible to use directly the library for Chinese traditional motifs and patterns. Next to the document you are reading, you will find documenta- tion on the package tikzrput. Contents How to install the package 2 How to use the package 2 The main macro 3 Number argument 3 Argument and options 4 Examples of the use of options 4 Style pgfornamentstyle 6 Advanced options from TikZ 6 THEORNAMENTSPACKAGE 2 What is a (pgf)ornament? 6 Placing a vector
    [Show full text]
  • No. 1 Three-Dimensional Graphics with Tikz/Pstricks and the Help Of
    TUGboat, Volume 0 (9999), No. 0 preliminary draft, December 27, 2017 18:02 ? 1 60 TUGboat, Volume 39 (2018), No. 1 Three-dimensional graphics with An interesting and detailed introduction to the TikZ/PSTricks and the help of Geogebra problem of producing three-dimensional graphics Three-dimensional graphics with with Ti kkZ can be found in an article by Keith Wol- Luciano Battaia TikZ/PSTricks and the help of GeoGebra cott [ [55],]. and It was actually in fact it was the just reading the reading of this ofarticle this that led us to study the problem in order to find AbstractLuciano Battaia article that led us to study the problem in order to finda more a more accessible affordable solution. solution. Wolcott's This article ends In this article we consider the opportunity of using a Abstract indeedwith a figure with a which figure shows that only shows the the partial onlysolution partial so- of dynamical geometry software like Geogebra in order what had been the main purpose of the project: the In this article we consider the opportunity of using lution of what was the main purpose of the project: to allow an easy export of three-dimensional geomet- drawing of two spheres and their circle of intersection. dynamic geometry software, such as GeoGebra, to the drawing of two spheres and their circle of inter- ric pictures, with subsequent 2D parallel projection, The author himself points out that the figure needs allow easy exporting of three-dimensional geometric section. Wolcott himself points out that the figure in PGF/TikZ or PSTricks code.
    [Show full text]
  • Pst-Fill a Pstricks Package for Filling and Tiling Areas
    pst-fill A PSTricks package for filling and tiling areas Timothy Van Zandt∗ March 11, 2007— Version 1.00 Documentation revised March 11, 2007 Contents 1 Introduction 2 2 Package history and description of it two different modes 2 2.1 Parameters ............................... 4 3 Examples 7 3.1 Kindoftiles............................... 7 3.2 Externalgraphicfiles. .. .. .. .. .. .. .. .. .. .. 14 3.3 Tilingofcharacters........................... 16 3.4 Otherkindsofusage .......................... 16 4 “Dynamic” tilings 17 4.1 Lewthwaite-Pickover-Truchet tiling . ... 17 4.2 Acompleteexample: thePoissonequation. 22 5 Driver file 25 6 pst-fill LATEX wrapper 26 7 Pst-Fill Package code 26 7.1 Preamble ................................ 26 7.2 Thesizeofthebox........................... 27 7.3 Definitionoftheparameters. 27 7.4 Definitionofthefillbox . .. .. .. .. .. .. .. .. .. 29 7.5 Themainmacros............................ 29 7.6 ThePostScriptsubroutines . 31 7.7 Closing ................................. 35 ∗[email protected]. (documentation by Denis Girou ([email protected]) and Herbert Voß([email protected]). 1 Abstract ‘pst-fill’ is a PSTricks (13), (6), (14), (9), (7) package to draw easily various kinds of filling and tiling of areas. It is also a good example of the great power and flexibility of PSTricks, as in fact it is a very short program (it body is around 200 lines long) but nevertheless really powerful. It was written in 1994 by Timothy van Zandt but publicly available only in PSTricks 97 and without any documentation. We describe here the version 97 patch 2 of December 12, 1997, which is the original one modified by myself to manage tilings in the so-called automatic mode. This article would like to serve both of reference manual and of user’s guide.
    [Show full text]
  • Pstricks: User's Guide
    PSTricks: PostScript macros for Generic TeX. M g leecheng m Mathematical Model for Dripping Faucet a Dripping Faucet User’s Guide Timothy Van Zandt 10 December 2007 Version 1.51 Author’s address: Department of Economics and Political Science INSEAD Boulevard de Constance 77305 Fontainebleau Cedex France Internet: <[email protected]> 1Documentation edited and repacked at December 23, 2007 by Rolf Niepraschk [email protected] and Herbert Voß [email protected]. Contents Welcome to PSTricks 1 Part I The Essentials 3 1 Arguments and delimiters 3 2 Color 4 3 Setting graphics parameters 5 4 Dimensions, coordinates and angles 6 5 Basic graphics parameters 8 Part II Basic graphics objects 10 6 Lines and polygons 10 7 Arcs, circles and ellipses 12 8 Curves 14 9 Dots 16 10 Grids 17 11 Plots 19 Part III More graphics parameters 24 12 Coordinate systems 24 13 Line styles 24 14 Fill styles 26 15 Arrowheads and such 28 16 Custom styles 30 Part IV Custom graphics 32 17 The basics 32 18 Parameters 32 19 Graphics objects 33 20 Safe tricks 36 Table of contents 1 21 Pretty safe tricks 38 22 For hackers only 39 Part V Picture Tools 41 23 Pictures 41 24 Placing and rotating whatever 42 25 Repetition 45 26 Axes 47 Part VI Text Tricks 51 27 Framed boxes 51 28 Clipping 54 29 Rotation and scaling boxes 55 Part VII Nodes and Node Connections 57 30 Nodes 58 31 Node connections 60 32 Node connections labels: I 69 33 Node connection labels: II 73 34 Attaching labels to nodes 74 35 Mathematical diagrams and graphs 75 36 Obsolete put commands 79 Part VIII Trees 82 37
    [Show full text]
  • Beamer and Tikz Workshop
    Beamer and TikZ Workshop Andrew Mertz William Slough Mathematics and Computer Science Department Eastern Illinois University July 17, 2007 TUG 2007: Practicing TEX Afternoon overview: TikZ I One of many drawing choices found in the TEX jungle I PGF is the “back end” — TikZ provides a convenient interface I TikZ shares some ideas with MetaPost and PSTricks I Multiple input formats: plain TEX, LATEX I Multiple output formats: PDF, PostScript, HTML/SVG I Works well with beamer and incremental slides I Extensive documentation (405 pages) TUG 2007: Practicing TEX TikZ capabilities: a laundry list 2-d points 3-d points Cartesian coordinates Polar coordinates Relative positions Named points Line segments B´eziercurves Rectangles Circles Ellipses Arcs Grids Text Drawing Clipping Filling Shading Iteration Transformations Libraries TUG 2007: Practicing TEX Layout of a TikZ-based document using LATEX \documentclass[11pt]{article} ... \usepackage{tikz} % Optional pgf libraries \usepackage{pgflibraryarrows} \usepackage{pgflibrarysnakes} ... \begin{document} ... \begin{tikzpicture} ... \end{tikzpicture} ... \end{document} TUG 2007: Practicing TEX Processing a TikZ-based document sample.tex pdflatex sample.pdf I Text and diagrams can be combined in one file I Stand-alone graphics can be obtained with pdfcrop TUG 2007: Practicing TEX 2-d points y P b a x \path (a, b) coordinate (P); TUG 2007: Practicing TEX A diamond of 2-d points \begin{tikzpicture} \draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle; \end{tikzpicture} TUG 2007: Practicing TEX A diamond
    [Show full text]
  • Dots, Lines and Curves
    GraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphicsGraphics andandandandandandandandandandandandandandandandandandandandandandandandandandandandandand TTTTTTTTTTTTTTTTTTETETETETETXETXETXETXETXETXETXETXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXEXXXXX Graphics with Getting the points Drawing Dots Simple Lines Ends of Lines PSTricks Bent Lines and Polygons Simple Curves Online L Part II { Graphics AT EX Tutorial c 2002, The Indian T This document is generated by hyperref, pstricks, pdftricks and pdfscreen packages in an intel and is released under EX Users Group The Indian Tpc running pdf Floor lppl T Trivandrum 695014, EX with iii, sjp gnu/linux http://www.tug.org.in Buildings,EX Users Cotton HillsGroup india Getting the points Drawing Dots Simple Lines Ends of Lines Bent Lines and Polygons 1. Graphics with PSTricks Simple Curves LATEX has only limited drawing capabilities, while PostScript is a page descrip- tion language which has a rich set of drawing commands; and there are programs (such as dvips) which translate the dvi output to PostScript. So, the natural question is whether one can include PostScript code in a TEX source file itself for programs such as dvips to process after the TEX compilation? This is the Online LATEX Tutorial idea behind the PSTricks package of Timothy van Zandt. The beauty of it is one need not know PostScript to use it|the necessary PostScript code can be Part II { Graphics generated by TEX macros defined in the package. c 2002, The Indian TEX Users Group This document is generated by pdfTEX with hyperref, pstricks, pdftricks and pdfscreen packages in an intel pc running gnu/linux and is released under lppl The Indian TEX Users Group Floor iii, sjp Buildings, Cotton Hills Trivandrum 695014, india http://www.tug.org.in Graphics with PSTricks 1.1.
    [Show full text]
  • Pst-Optexp.Pdf
    PSTricks pst-optexp Drawing optical experimental setups v6.0 2021/02/26 Package author: Christoph Bersch Contents 1. Introduction 6 1.1. Aboutthepackage ............................. 6 1.2. Requirements ................................ 6 1.3. Distributionandinstallation . .... 6 1.4. License.................................... 7 1.5. Backwardcompatibility. 7 1.6. Notation ................................... 7 1.7. Acknowledgements . 8 2. Basic ideas 9 2.1. Thecomponents............................... 9 2.2. Labels..................................... 10 2.3. Free-rayconnections . 10 2.4. Fiberconnections . 12 2.5. Step-by-stepexamples . 13 2.5.1. Galileantelescope . 13 2.5.2. Fibersetup .............................. 15 2.5.3. Fibersetup(alternative) . 16 2.5.4. Michelson-Interferometer . 17 3. General component parameters 19 3.1. Labels..................................... 19 3.2. Positioning .................................. 21 3.3. Rotatingandshifting . 22 3.4. Usingpsstyles ................................ 24 3.5. Componentappearance. 25 4. Free-ray components 27 4.1. Lens...................................... 27 4.2. Asphericlens................................. 29 4.3. Opticalplate ................................. 31 4.4. Retardationplate . .. .. .. .. .. ... .. .. .. .. .. .. .. .. 31 2 Contents 3 4.5. Pinhole .................................... 32 4.6. Box ...................................... 32 4.7. Arrowcomponent .............................. 33 4.8. Barcomponent ............................... 34 4.9. Opticalsource ...............................
    [Show full text]