Questions tagged [tikz]

TikZ is a set of higher-level TeX macros for producing vector graphics that use PGF (Portable Graphics Format)

TikZ is a set of higher-level TeX macros for producing vector graphics that use PGF (Portable Graphics Format)

470 questions
3
votes
0 answers

How does tikzplotlib deal with generic RGB colours?

I've just started transitioning over from MATLAB to python and I'm moving from matlab2tikz to tikzplotlib (same author). The tikzplotlib script doesn't appear to be defining the the custom colours it is using, so although a tikz plot might be…
casimp
  • 105
  • 1
  • 9
3
votes
2 answers

Trees and macros with tikz

I am trying to build my trees using macros but I don't get the result I want. Here is a minimal example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees} \newcommand{\LeafNode}[1]{% child {node …
Tsf
  • 1,339
  • 5
  • 17
  • 29
3
votes
3 answers

Query regarding drawing TikZ figure

In this sample code, the author does the following \draw ($(closedStart.south) + (-.5em,0)$) edge[stateEdge] node[edgeLabel, xshift=-3em]{\emph{Passive open}} ($(listen.north) + (-.5em,0)$); What irritates me most about these markup…
user855
  • 19,048
  • 38
  • 98
  • 162
3
votes
1 answer

Blurry text in PNG image converted from PDF via TikZ and standalone package

I've got a problem converting a pdflatex-generated PDF image to a PNG image using the standalone package. The pixelated rendering of the text in the converted image (PDF->PS->PNG via gs and ImageMagick?) is awfully blurry and inferior in quality…
svenpables
  • 99
  • 1
  • 9
3
votes
1 answer

Knitr and tikzDevice not working together with article options

I have a problem with knitr and tikzDevice, like someone before me. (See https://tex.stackexchange.com/questions/106057/tikzdevice-is-not-getting-sizes-right-knitr/106595#106595 .) He used dev.args to get rid of this error, but if I run this code…
cjena
  • 307
  • 1
  • 3
  • 9
2
votes
1 answer

Shade the intersection area between 2 curves in Latex

I'm having to draw a polar graph and shade the area between the line (theta = pi/8) (blue line) and the curve (r = 4 * sqrt(2) * cos(2*theta) (red curve). Figure My current Latex (the area hasn't been…
2
votes
1 answer

Plot of sin(x)/x is shifted/misplaced

I want to plot sin(x)/x but the x-axis is offset by \pi/2. The mwe is \documentclass{scrbook} \usepackage{tikz,pgfplots} \begin{document} \begin{figure} \centering \begin{tikzpicture} \begin{axis}[ % cycle list, …
clme
  • 45
  • 4
2
votes
1 answer

trying to add subcaption or subfloat with circuitikz or tabular but could not succeed

I've been trying to add subcaption under the circuit drawing but could not succeed yet. I do not know how to add \subcaption or \subfloat. I only know how to do that with images but not with \circuitikz or…
2
votes
0 answers

Save Matplotlib animation Tikzplotlib

I have a numerical simulation that I run with a short python code using animation.Funcanimation. Is is possible to use tikzplotlib to produce a .tex file including the whole simulation (and not just one picture) ? This would mean combining tikz and…
xounamoun
  • 121
  • 2
2
votes
0 answers

Cartesian axes with tkz-Euclide have missing tick marks

I just started using tkz-Euclide and tried to create a XY coordinate axes. According to the tkz-Euclide manual, the following code creates it: \documentclass{article} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture}[scale=1] …
2
votes
1 answer

How to set the maximum width of an input node in an algorithm flowchart with LateX and tikz

I would like to set the width for a node, in particular, an Input/Output node in Tikz. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \tikzstyle{io} = [trapezium, trapezium left…
Shadow
  • 57
  • 1
  • 5
2
votes
1 answer

Latex Diamond Symbol in Algorithm Flowcharts

\tikzstyle{decision2} = [diamond, minimum width=8cm, minimum height=1cm, text centered, text width=4cm, draw=black, fill=green!30] In this image we can see the Diamond from the Flow chart, generated by the code above As you can see the diamond is…
Shadow
  • 57
  • 1
  • 5
2
votes
1 answer

Generating random points then connecting points less than certain distance away

I currently have the code below which produces the later output. I would like to generate the 10 points randomly as I already am. But instead of having blue dashed lines connecting to the the location (0,0), I want them to connect to the other dots…
dcat52
  • 150
  • 8
2
votes
1 answer

multipart shape horizontal split

How come the horizontal split seems not to work whereas the vertical one does ? \documentclass[12pt,standalone]{article} \usepackage{tikz} \begin{document} \usetikzlibrary {shapes.multipart} \begin{tikzpicture}[my shape/.style={rectangle split…
2
votes
1 answer

Draw a grid with 32 cells, intermediate rectangles does not show up

I would like to draw a figure describing the floating-point IEEE754 specification. Doing so, I tried to draw a grid with 32 rectangles. (I then figured out there is a grid command). Here is a MWE for 4…
Dimitri Lesnoff
  • 317
  • 1
  • 14