Improving figures using TikZ/PGF for LATEX: An Introduction

Similar documents
BoxPlot++ Zeina Azmeh, Fady Hamoui, Marianne Huchard. To cite this version: HAL Id: lirmm

Multimedia CTI Services for Telecommunication Systems

Fault-Tolerant Storage Servers for the Databases of Redundant Web Servers in a Computing Grid

Relabeling nodes according to the structure of the graph

Blind Browsing on Hand-Held Devices: Touching the Web... to Understand it Better

Setup of epiphytic assistance systems with SEPIA

Tacked Link List - An Improved Linked List for Advance Resource Reservation

Real-Time Collision Detection for Dynamic Virtual Environments

Comparison of spatial indexes

Linked data from your pocket: The Android RDFContentProvider

Mokka, main guidelines and future

Taking Benefit from the User Density in Large Cities for Delivering SMS

Study on Feebly Open Set with Respect to an Ideal Topological Spaces

HySCaS: Hybrid Stereoscopic Calibration Software

Branch-and-price algorithms for the Bi-Objective Vehicle Routing Problem with Time Windows

X-Kaapi C programming interface

How to simulate a volume-controlled flooding with mathematical morphology operators?

Every 3-connected, essentially 11-connected line graph is hamiltonian

Linux: Understanding Process-Level Power Consumption

Comparison of radiosity and ray-tracing methods for coupled rooms

A Voronoi-Based Hybrid Meshing Method

Stream Ciphers: A Practical Solution for Efficient Homomorphic-Ciphertext Compression

The optimal routing of augmented cubes.

Service Reconfiguration in the DANAH Assistive System

Assisted Policy Management for SPARQL Endpoints Access Control

The Connectivity Order of Links

Regularization parameter estimation for non-negative hyperspectral image deconvolution:supplementary material

The Proportional Colouring Problem: Optimizing Buffers in Radio Mesh Networks

Comparator: A Tool for Quantifying Behavioural Compatibility

Change Detection System for the Maintenance of Automated Testing

Structuring the First Steps of Requirements Elicitation

Light field video dataset captured by a R8 Raytrix camera (with disparity maps)

From medical imaging to numerical simulations

An FCA Framework for Knowledge Discovery in SPARQL Query Answers

Representation of Finite Games as Network Congestion Games

DANCer: Dynamic Attributed Network with Community Structure Generator

Natural Language Based User Interface for On-Demand Service Composition

Quality of Service Enhancement by Using an Integer Bloom Filter Based Data Deduplication Mechanism in the Cloud Storage Environment

Real-time FEM based control of soft surgical robots

SDLS: a Matlab package for solving conic least-squares problems

FIT IoT-LAB: The Largest IoT Open Experimental Testbed

BugMaps-Granger: A Tool for Causality Analysis between Source Code Metrics and Bugs

LaHC at CLEF 2015 SBS Lab

YAM++ : A multi-strategy based approach for Ontology matching task

Catalogue of architectural patterns characterized by constraint components, Version 1.0

Very Tight Coupling between LTE and WiFi: a Practical Analysis

KeyGlasses : Semi-transparent keys to optimize text input on virtual keyboard

Computing and maximizing the exact reliability of wireless backhaul networks

Moveability and Collision Analysis for Fully-Parallel Manipulators

The New Territory of Lightweight Security in a Cloud Computing Environment

QuickRanking: Fast Algorithm For Sorting And Ranking Data

Prototype Selection Methods for On-line HWR

Traffic Grooming in Bidirectional WDM Ring Networks

Modularity for Java and How OSGi Can Help

Scalewelis: a Scalable Query-based Faceted Search System on Top of SPARQL Endpoints

Open Digital Forms. Hiep Le, Thomas Rebele, Fabian Suchanek. HAL Id: hal

An Experimental Assessment of the 2D Visibility Complex

THE KINEMATIC AND INERTIAL SOIL-PILE INTERACTIONS: CENTRIFUGE MODELLING

Reverse-engineering of UML 2.0 Sequence Diagrams from Execution Traces

SIM-Mee - Mobilizing your social network

A million pixels, a million polygons: which is heavier?

NP versus PSPACE. Frank Vega. To cite this version: HAL Id: hal

Scan chain encryption in Test Standards

Malware models for network and service management

DSM GENERATION FROM STEREOSCOPIC IMAGERY FOR DAMAGE MAPPING, APPLICATION ON THE TOHOKU TSUNAMI

Teaching Encapsulation and Modularity in Object-Oriented Languages with Access Graphs

QAKiS: an Open Domain QA System based on Relational Patterns

Multi-atlas labeling with population-specific template and non-local patch-based label fusion

lambda-min Decoding Algorithm of Regular and Irregular LDPC Codes

IntroClassJava: A Benchmark of 297 Small and Buggy Java Programs

Mapping classifications and linking related classes through SciGator, a DDC-based browsing library interface

Learning Object Representations for Visual Object Class Recognition

YANG-Based Configuration Modeling - The SecSIP IPS Case Study

Deformetrica: a software for statistical analysis of anatomical shapes

An Efficient Numerical Inverse Scattering Algorithm for Generalized Zakharov-Shabat Equations with Two Potential Functions

Emerging and scripted roles in computer-supported collaborative learning

Simulations of VANET Scenarios with OPNET and SUMO

Fuzzy sensor for the perception of colour

Zigbee Wireless Sensor Network Nodes Deployment Strategy for Digital Agricultural Data Acquisition

Using a Medical Thesaurus to Predict Query Difficulty

Real-Time and Resilient Intrusion Detection: A Flow-Based Approach

Self-optimisation using runtime code generation for Wireless Sensor Networks Internet-of-Things

Application of Artificial Neural Network to Predict Static Loads on an Aircraft Rib

Motion-based obstacle detection and tracking for car driving assistance

Syrtis: New Perspectives for Semantic Web Adoption

Robust IP and UDP-lite header recovery for packetized multimedia transmission

Quasi-tilings. Dominique Rossin, Daniel Krob, Sebastien Desreux

THE COVERING OF ANCHORED RECTANGLES UP TO FIVE POINTS

Efficient implementation of interval matrix multiplication

Implementing an Automatic Functional Test Pattern Generation for Mixed-Signal Boards in a Maintenance Context

Privacy-preserving carpooling

Developing interfaces for the TRANUS system

The Animation Loop Station: Near Real-Time Animation Production

Is GPU the future of Scientific Computing?

Kernel perfect and critical kernel imperfect digraphs structure

FAST LONG-TERM MOTION ESTIMATION FOR HIGH DEFINITION VIDEO SEQUENCES BASED ON SPATIO-TEMPORAL TUBES AND USING THE NELDER-MEAD SIMPLEX ALGORITHM

A Resource Discovery Algorithm in Mobile Grid Computing based on IP-paging Scheme

Inverting the Reflectance Map with Binary Search

Formal modelling of ontologies within Event-B

A Practical Evaluation Method of Network Traffic Load for Capacity Planning

Transcription:

Improving figures using TikZ/PGF for LATEX: An Introduction Vincent Darrigrand, Florian Faucher To cite this version: Vincent Darrigrand, Florian Faucher. Improving figures using TikZ/PGF for LATEX: An Introduction. Doctoral. Bilbao, Spain. 2016. <cel-01400571> HAL Id: cel-01400571 https://hal.archives-ouvertes.fr/cel-01400571 Submitted on 22 Nov 2016 HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Improving figures using TikZ/PGF for L A TEX: An Introduction Vincent Darrigrand 1,2 Florian Faucher 2 1 University of the Basque Country (UPV/EHU), Leioa, Spain, 2 INRIA - MAGIQUE 3D, University of Pau (UPPA), France, May 25, 2016 BCAM Bilbao, Spain

Resources 2 Examples and short tutorials online. en.wikipedia.org/wiki/pgf/tikz www.texample.net/tikz/resources/ www.texample.net/tikz/examples/ List of packages TikZ/PGF: www.ctan.org/topic/pgf-tikz PGF Manual: mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf Pgfplots manual: mirrors.ctan.org/ graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf

Learning process 3 1 Working from already existing files. 2 Generation of TiKZ examples from software: Geogebra, Matlab, R, inkscape... 3 Understand and adapt the examples. 4 Make your own pictures

Introduction 4 \usepackage{pgfplots} % loads TiKZ/PGF and pgfplots \usepgfplotslibrary{library_name} \usetikzlibrary{library_name} \begin{figure} \begin{tikzpicture}. Here is the code for your picture. \end{tikzpicture} \caption{my caption} \end{figure}

Overview 5 1 Algorithm 2 Computational domain sketch 3 Data plot

Algorithm

Algorithm related graph: algo_example.tex 7 Solve: hp-fem next iteration Estimate Mark Refine Figure: Algorithm related graph

Algorithm 8 \node[boxoptions] (sol){solve: hp-fem}; Solve: hp-fem

Algorithm 9 \node[boxoptions] (sol){solve: hp-fem}; Solve: hp-fem \tikzset{boxoptions/.style={ rectangle, rounded corners, draw=black, very thick, text width=6.5em, minimum height=2em, text centered} }

Algorithm 10 \node[boxoptions] (sol){solve: hp-fem}; \node[boxoptions,below=of sol] (estim){estimate}; Solve: hp-fem Estimate

Algorithm 11 \node[boxoptions] (sol){solve: hp-fem}; \node[boxoptions,below=of sol] (estim){estimate}; \node[boxoptions,below=of estim] (mark){mark}; Solve: hp-fem Estimate Mark

Algorithm 12 \node[boxoptions] (sol){solve: hp-fem}; \node[boxoptions,below=of sol] (estim){estimate}; \node[boxoptions,below=of estim] (mark){mark}; Solve: hp-fem Estimate Mark Refine \node[boxoptions,below=of mark] (ref)refine;

Algorithm 13 \draw[arrowstyle] (sol.east) to[out=0,in=0] (estim.east); \tikzset{arrowstyle/.style={ ->, thick, shorten <=2pt, shorten >=2pt}, Solve: hp-fem Estimate Mark Refine

Algorithm 14 \draw[arrowstyle] (sol.east) to[out=0,in=0] (estim.east); \draw[arrowstyle] (estim.west) to[out=180, in=180] (mark.west); Solve: hp-fem Estimate Mark Refine

Algorithm 15 \draw[arrowstyle] (sol.east) to[out=0,in=0] (estim.east); \draw[arrowstyle] (estim.west) to[out=180, in=180] (mark.west); \draw[arrowstyle] (mark.east) to[out=0,in=0] (ref.east); Solve: hp-fem Estimate Mark Refine

Algorithm 16 \draw[arrowstyle] (sol.east) to[out=0,in=0] (estim.east); \draw[arrowstyle] (estim.west) to[out=180, in=180] (mark.west); \draw[arrowstyle] (mark.east) to[out=0,in=0] (ref.east); next iteration Solve: hp-fem Estimate Mark Refine \draw[arrowstyle] (ref.west) to[out=180,in=180] node[sloped, anchor=south] {next iteration}(sol.west);

Computational domain sketch

Computational Domain: sketch_example.tex 18 Γ 1 N (1, 1) Γ D Ω Γ 2 N (0, 0) Γ 1 N Figure: 2D Computational domain

Computational Domain: Step by step 19 \draw[color=black] (0,0) rectangle (1,1); (1, 1) \node[anchor=north east] at (0,0){(0, 0)}; \node[anchor=south west] at (1,1){(1, 1)}; (0, 0)

Computational Domain: Step by step 20 \draw[color=black] (0,0) rectangle (1,1); \node at (0.5,0.5) {Ω}; (1, 1) Ω (0, 0)

Computational Domain: Step by step 21 \draw[border_style, color=green!50!black](1,0) (1,1); \draw[border_style, color=blue](0,1) (1,1); \draw[border_style, color=blue](0,0) (1,0); Ω (1, 1) \draw[border_style, color=red,](0,0) (0,1); (0, 0) \tikzset{border_style/.style = {line width=2pt}}

Computational Domain: Step by step 22 \node[anchor=east, color=red] at (0,1/2) {Γ D }; Γ 1 N (1, 1) \node[anchor=south, color=blue] at (1/2,1) {Γ 1 N }; \node[anchor=north, color=blue] at (1/2,0) {Γ 1 N }; Γ D Ω Γ 2 N \node[anchor=west, color=green!50!black] at (1,1/2) {Γ 2 N }; (0, 0) Γ 1 N

Computational Domain: Step by step 23 \draw[step=0.2,gray] (0,0) grid (1,1); Γ 1 N (1, 1) Γ D Ω Γ 2 N (0, 0) Γ 1 N

Data plot

Raw Data: data.txt, data_plot_example.tex 25 epsilon error1 error2 7.1 10 3 1.51 10 2 2.27 10 3 9.5 10 3 2.01 10 2 3.96 10 3 1.28 10 2 2.69 10 2 5.84 10 3 1.73 10 2 3.6 10 2 1.23 10 2 2.32 10 2 4.76 10 2 2.61 10 2 3.12 10 2 6.28 10 2 2.51 10 2

Data Plots: a simple example \begin{axis}[axis options ] 10 1 \addplot[color=blue] table[x=epsilon,y=error1] {./data.txt}; \addplot[color=green!50!black] table[x=epsilon,y=error2] {./data.txt}; 10 2 \end{axis} 26 10 3 1 2 3 10 2

Data Plots: a simple example \begin{axis}[axis options ] \addplot[color=blue] table[x=epsilon,y=error1] {./data.txt}; \addlegendentry{error 1}; \addplot[color=green!50!black] table[x=epsilon,y=error2] {./data.txt}; \addlegendentry{error 2}; 10 1 Error 1 Error 2 10 2 \end{axis} 27 10 3 1 2 3 10 2

Data Plots: a simple example \begin{axis}[axis options ] \addplot[color=blue] table[x=epsilon,y=error1] {./data.txt}; \addlegendentry{error 1}; \addplot[color=green!50!black, dashed] table[x=epsilon,y=error2] {./data.txt}; \addlegendentry{error 2}; 10 1 Error 1 Error 2 10 2 \end{axis} 28 10 3 1 2 3 10 2

Data Plots: a simple example Axis options: ymode=log, ymin=1e-3, ymax=1e-1, xlabel=casing, ylabel=error, 10 1 Error 1 Error 2 Error 10 2 29 10 3 1 2 3 Casing 10 2

Data Plots: a simple example Axis options: ymode=log, ymin=1e-3, ymax=1e-1, xlabel=casing, ylabel=error, x dir=reverse, Error 10 1 10 2 Error 1 Error 2 30 10 3 3 2 Casing 1 10 2

Data Plots: a simple example Axis options: ymode=log, ymin=1e-3, ymax=1e-1, xlabel=casing, ylabel=error, x dir=reverse, More plot options: mark=+, mark=o, mark size=3pt, line width=2pt, Error 10 1 10 2 Error 1 Error 2 31 10 3 3 2 Casing 1 10 2

Data Plots: a simple example Legend options: legend pos=north east, 10 1 Error 1 Error 2 Error 10 2 32 10 3 3 2 Casing 1 10 2

Data Plots: a simple example Legend options: legend pos=north east, legend pos=south west, 10 1 Error 10 2 33 10 3 3 Error 1 Error 2 2 1 Casing 10 2

Data Plots: a simple example Legend options: legend pos=north east, legend pos=south west, 10 1 Error 2 Pin point: (after the \addplot) node[pin={[pin edge={<-,solid, blue, thick}]90: Error2} ] at (1.5e-2,3e-2) {}; Error 10 2 Error 1 34 10 3 3 2 Casing 1 10 2

Many ways and packages to improve your figures y CK 1 0.5 0 Amplitude Ω2 Ω1 Ω0 1 e iγh z+ e iγh 1 x x y z wavespeed (km/s) depth (km) 0 0.5 1 2 x (km) 1 0 0 0.5 1 y (km) 0 0.5 1 0 1 2 x (km) 5 4 3 2 35