• Aucun résultat trouvé

Improving figures using TikZ/PGF for LATEX: An Introduction

N/A
N/A
Protected

Academic year: 2021

Partager "Improving figures using TikZ/PGF for LATEX: An Introduction"

Copied!
36
0
0

Texte intégral

(1)

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 sci-entific research documents, whether they are pub-lished 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.

To cite this version:

Vincent Darrigrand, Florian Faucher. Improving figures using TikZ/PGF for LATEX: An Introduc-tion. Doctoral. Bilbao, Spain. 2016. �cel-01400571�

(2)

Vincent Darrigrand 1,2 Florian Faucher 2

1University of the Basque Country (UPV/EHU), Leioa, Spain, 2INRIA - MAGIQUE 3D, University of Pau (UPPA), France,

May 25, 2016 BCAM Bilbao, Spain

(3)

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

(4)

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

(5)

\usetikzlibrary{library_name}

\begin{figure}

\begin{tikzpicture} ..

.

Here is the code for your picture

.. .

\end{tikzpicture} \caption{my caption}

(6)

1 Algorithm

2 Computational domain sketch

3 Data plot

(7)
(8)

Solve: hp-FEM Estimate Mark Refine next iteration

Figure: Algorithm related graph

(9)
(10)

\node[boxOptions] (sol){Solve: hp-FEM};

\tikzset{boxOptions/.style={ rectangle,

rounded corners,

draw=black, very thick, text width=6.5em, minimum height=2em, text centered} } Solve: hp-FEM 9

(11)

\node[boxOptions,below=of sol]

(estim){Estimate};

(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 11

(13)

\node[boxOptions,below=of sol] (estim){Estimate}; \node[boxOptions,below=of estim] (mark){Mark}; \node[boxOptions,below=of mark] (ref)Refine; Estimate Mark Refine

(14)

\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 13

(15)

(estim.east); \draw[arrowStyle] (estim.west) to[out=180, in=180] (mark.west); Estimate Mark Refine

(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); Solve: hp-FEM Estimate Mark Refine 15

(17)

(estim.east); \draw[arrowStyle] (estim.west) to[out=180, in=180] (mark.west); \draw[arrowStyle] (mark.east) to[out=0,in=0] (ref.east); \draw[arrowStyle] (ref.west) to[out=180,in=180] node[sloped, anchor=south] Estimate Mark Refine next iteration

(18)
(19)

ΓD

Γ1N

Γ2N

(0, 0)

(20)

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

(21)

\node at (0.5,0.5) {Ω};

(0, 0)

(22)

\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); \draw[border_style, color=red,](0,0) – (0,1); \tikzset{border_style/.style = {line width=2pt}} (0, 0) (1, 1)21

(23)

\node[anchor=south, color=blue] at (1/2,1) {Γ1N}; \node[anchor=north, color=blue] at (1/2,0) {Γ1N}; \node[anchor=west, color=green!50!black] at (1,1/2) {Γ2N}; (0, 0) Ω ΓD Γ1N Γ2N

(24)

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

(25)
(26)

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 25

(27)

\addplot[color=blue] table[x=epsilon,y=error1] {./data.txt}; \addplot[color=green!50!black] table[x=epsilon,y=error2] {./data.txt}; \end{axis} 1 2 3 10−3 10−2

(28)

\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}; \end{axis} 1 2 3 ·10−2 10−3 10−2 10−1 Error 1 Error 2 27

(29)

\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}; \end{axis} 1 2 3 10−3 10−2 Error 2

(30)

Axis options: ymode=log, ymin=1e-3, ymax=1e-1, xlabel=Casing, ylabel=Error, 1 2 3 ·10−2 10−3 10−2 10−1 Casing Erro r Error 1 Error 2 29

(31)

ymin=1e-3, ymax=1e-1, xlabel=Casing, ylabel=Error, x dir=reverse, 1 2 3 10−3 10−2 Erro r Error 2

(32)

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, 1 2 3 ·10−2 10−3 10−2 10−1 Casing Erro r Error 1 Error 2 31

(33)

1 2 3 10−3 10−2 Erro r Error 2

(34)

Legend options:

legend pos=north east, legend pos=south west,

1 2 3 ·10−2 10−3 10−2 10−1 Casing Erro r Error 1 Error 2 33

(35)

legend pos=south west,

Pin point: (after the \addplot)

node[pin={[pin edge={<-,solid, blue, thick}]90: Error2}

] at (1.5e-2 ,3e-2) {}; 1 2 3 10−3 10−2 Error 1 Erro r

(36)

0 0.5 1 x y Amplitude Ω2 Ω1 Ω0 x y CK 1 1 z+ eiγh z− e−iγh 0 1 2 0 0.5 1 0 0.5 1 x (km) y (km) depth (km) 0 1 2 0 0.5 1 x (km) 2 3 4 5 wavespeed (km/s) 35

Références

Documents relatifs

To test whether the vesicular pool of Atat1 promotes the acetyl- ation of -tubulin in MTs, we isolated subcellular fractions from newborn mouse cortices and then assessed

Néanmoins, la dualité des acides (Lewis et Bronsted) est un système dispendieux, dont le recyclage est une opération complexe et par conséquent difficilement applicable à

Cette mutation familiale du gène MME est une substitution d’une base guanine par une base adenine sur le chromosome 3q25.2, ce qui induit un remplacement d’un acide aminé cystéine

En ouvrant cette page avec Netscape composer, vous verrez que le cadre prévu pour accueillir le panoramique a une taille déterminée, choisie par les concepteurs des hyperpaysages

Chaque séance durera deux heures, mais dans la seconde, seule la première heure sera consacrée à l'expérimentation décrite ici ; durant la seconde, les élèves travailleront sur

A time-varying respiratory elastance model is developed with a negative elastic component (E demand ), to describe the driving pressure generated during a patient initiated

The aim of this study was to assess, in three experimental fields representative of the various topoclimatological zones of Luxembourg, the impact of timing of fungicide

Attention to a relation ontology [...] refocuses security discourses to better reflect and appreciate three forms of interconnection that are not sufficiently attended to