Example: barber

TikZ Tutorial - MIT

TikZ TutorialNick HorelikMITF ebruary 14, 2014 Nick Horelik (MIT)TikZ TutorialFebruary 14, 20141 / 20 What Is TikZ? PGF: Portble Graphics Format (or pretty, good, functional ) Tikz: Tikz istkeinZeichenprogramm Allows creation of vector graphic schemes, charts, diagrams, .. Placed inlinein the middle of text In floatspotent perimeter sitesNon metallic moleculeextra electronsingle metal atomFigure: A tikzpictureNick Horelik (MIT)TikZ TutorialFebruary 14, 20142 / 20 The Good and the Bad Pros Programatically draw with exact precision Consistent typography Very fast for simple graphics Cons Steep learning curve No WYSIWYG Changes require recompileNick Horelik (MIT)TikZ TutorialFebruary 14, 20143 / 20 TONS of help online Manual and Search the document! node Huge example Vibrant community for specific is your best friend!(try searching for tikz arrow head size )Nick Horelik (MIT)TikZ TutorialFebruary 14, 20144 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->] (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond] (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14.

Tikz Core Concepts: Key-Value Parameters, Nodes Attributes are set everywhere with key=value Nodes are inserted at the current position of a path, or at a speci ed location text Nodes can have options too text Nodes can be named to reference their coordinates Nick Horelik (MIT) TikZ Tutorial February 14, 2014 8 / 20

Tags:

  Core, Tutorials, Kitz, Tikz tutorial

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of TikZ Tutorial - MIT

1 TikZ TutorialNick HorelikMITF ebruary 14, 2014 Nick Horelik (MIT)TikZ TutorialFebruary 14, 20141 / 20 What Is TikZ? PGF: Portble Graphics Format (or pretty, good, functional ) Tikz: Tikz istkeinZeichenprogramm Allows creation of vector graphic schemes, charts, diagrams, .. Placed inlinein the middle of text In floatspotent perimeter sitesNon metallic moleculeextra electronsingle metal atomFigure: A tikzpictureNick Horelik (MIT)TikZ TutorialFebruary 14, 20142 / 20 The Good and the Bad Pros Programatically draw with exact precision Consistent typography Very fast for simple graphics Cons Steep learning curve No WYSIWYG Changes require recompileNick Horelik (MIT)TikZ TutorialFebruary 14, 20143 / 20 TONS of help online Manual and Search the document! node Huge example Vibrant community for specific is your best friend!(try searching for tikz arrow head size )Nick Horelik (MIT)TikZ TutorialFebruary 14, 20144 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->] (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond] (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond,thick] (0,0) -- (1,2);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond,thick,red] (0,0) -- (1,2).

2 Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond,thick,red] (0,0) -- (1,2) -| (3,4);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond,thick,red] (0,0) -- (1,2) |- (3,4);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Example: Drawing a Path\draw[help lines, thick] (0,0) grid (4,4);\draw[->,>=diamond,thick,red] (0,0) -- (1,2) -| (3,4) -- (1,1);Nick Horelik (MIT)TikZ TutorialFebruary 14, 20145 / 20 Tikz core Concepts: Points Points:(1cm,2pt) Relative points:(5,5)(1,0)(1,1)(0,1)(5,5)(6,0)(6, 6)(6,7)++++ Named 3D points:(1,1,2)Nick Horelik (MIT)TikZ TutorialFebruary 14, 20146 / 20 Tikz core Concepts: Idea of Paths Series of straight or curved lines \path(2em,0) -- (0,0) -- (0,2em) -- cycle Canacton paths:draw,fill,shade,clip Attributes can be applied mid-pathNick Horelik (MIT)TikZ TutorialFebruary 14, 20147 / 20 Tikz core Concepts: Key-Value Parameters, Nodes Attributes are set everywhere withkey=value Nodesare inserted at the current position of a path, or at a specifiedlocationtext Nodes can have options tootext Nodes can be named to reference their coordinatesNick Horelik (MIT)TikZ TutorialFebruary 14, 20148 / 20 Tikz core Concepts: Trees Nodes can be arranged in trees automaticallyrootleftrightchildchildNick Horelik (MIT)TikZ TutorialFebruary 14, 20149 / 20 Tikz core Concepts.

3 Scopes Attributes can be applied to all objects in a scope Check out/tikz/every path, and/tikz/every nodei m a nodei m a node tooNick Horelik (MIT)TikZ TutorialFebruary 14, 201410 / 20 Tikz core Concepts: Transformations Coordinates can be transformed Nodes can be moved tooi m a nodei m a node tooNick Horelik (MIT)TikZ TutorialFebruary 14, 201411 / 20 Example: Decision TreeI m cookingShould I add cheeseto my meal?You should add cheeseAdd cheeseBut I don t like cheeseNoYesEveryone loves cheeseNick Horelik (MIT)TikZ TutorialFebruary 14, 201412 / 20 Styles, Libraries, ColorsI m cookingShould I add cheeseto my meal?You should add cheeseAdd cheeseBut I don t like cheeseNoYesEveryone loves cheeseNick Horelik (MIT)TikZ TutorialFebruary 14, 201413 / 20 Example: Hyperlinksthingsare goodand badpathsare coolNick Horelik (MIT)TikZ TutorialFebruary 14, 201414 / 20 Text Overlays You can use tikz over the text withoverlay Node names are available to future tikzpictures withremember pictureNick Horelik (MIT)TikZ TutorialFebruary 14, 201415 / 20 Stacked Figures in Beamer Stacking pictures in Beamer is easy with overlaysNick Horelik (MIT)TikZ TutorialFebruary 14, 201416 / 20 Stacked Figures in Beamer Stacking pictures in Beamer is easy with overlaysNick Horelik (MIT)TikZ TutorialFebruary 14, 201416 / 20 Plotting Functionsxf(x)f(x) =xf(x) = sinxf(x) =120exNick Horelik (MIT)TikZ TutorialFebruary 14, 201417 / 20 Plotting Data68101214160500010000150002000025000 EducationIncomeNick Horelik (MIT)TikZ TutorialFebruary 14, 201418 / 20 Example.

4 Membrane and Ions++++++++++++++++++++++++++++++++++++ ++++++++++++Nick Horelik (MIT)TikZ TutorialFebruary 14, 201419 / 20 Example: 3D Random WalkNick Horelik (MIT)TikZ TutorialFebruary 14, 201420 / 20


Related search queries