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
1 answer

Adding edge weights to TikZ using \draw syntax

I have the following graph using TikZ: \begin{tikzpicture} \tikzset{vertex/.style = {shape=circle,draw,minimum size=2em}} \tikzset{edge/.style = {->,> = latex'}} % Vertices \node[vertex] (s) at (0,0) {s}; …
Chris B.
  • 455
  • 7
  • 19
3
votes
0 answers

tikz: relative positioning of clipped scopes

I am trying to compose some tikz diagrams into a larger overview chart, but I am having difficulties aligning the sub-images relatively to their parent objects and to each other. The sub-images are cropped out in rectangle shape from some other tikz…
mattu
  • 944
  • 11
  • 24
3
votes
1 answer

How to scale a barplot in tikz without scaling the text?

I have a barplot in latex in tikz, that I want to scale (reduce width, increase length), but without the text having the same effect. \begin{figure} \centering \resizebox{0.8\textwidth}{1.3\textwidth}{ \begin{tikzpicture} \pgfplotsset{every tick…
Eli
  • 31
  • 1
  • 2
3
votes
1 answer

Infering the size of a minipage from the containing tikz node for rmarkdown

This is a follow-up question to Using bullets list in tikz's node label in rmarkdown. I had some TikZ code that works fine in pure LaTex but NOT when I transport it to rmarkdown where the error ! LaTeX Error: Something's wrong--perhaps a missing…
Liman
  • 1,270
  • 6
  • 12
3
votes
2 answers

Using bullets list in tikz's node label in rmarkdown

I have a tikz code to generate some graphs that works properly in latex (tested on overleaf: https://www.overleaf.com). However, this is supposed to be part of a large rmarkdown file but I cannot seem to use bullets list in some of my node labels…
Liman
  • 1,270
  • 6
  • 12
3
votes
0 answers

No shape named X is known

I am trying to create a tikz picture with pgfplots featuring an angle with the tkz-euclide package. However, after much difficulty, I am unable to compile the latex document. I tried changing the paramaters within the path. Nothing seems to be…
3
votes
0 answers

Tikz externalize does not work although shell escape is enabled

I am using TexStudio with Miktex on my thesis and need to externalize all the tikz graphics created. I worked through a lot of posts but couldn't figure out why i cannot externalize my code. I use pdflatex.exe -synctex=1 -interaction=nonstopmode…
Avinta
  • 678
  • 1
  • 9
  • 26
3
votes
1 answer

Evaluate a function and assign to a constant to use as tick markin Tikz/pgfplots

I'm defining some functions to plot using pgfplots and that has been successful. Now I would like to add a y tick at a point that's evaluated using these functions (lbound below). I can't seem to be able to use lbound as a constant however. This is…
cinny
  • 2,292
  • 3
  • 18
  • 23
3
votes
1 answer

addplot: set default domain

In pgfplots, when plotting a function, the default domain in -5:5. I would like to set this to be xmin:xmax by default. Is there a way to do this? In other words, I would like to be able to write \addplot {x^2}; instead…
LMBC
  • 76
  • 1
  • 8
3
votes
1 answer

Box in commutative diagram

In the following commuting diagram, I would like to draw a box containing the bottom triangle defined by nodes D, E and F. Do you know how I could do…
Aleph
  • 1,343
  • 1
  • 12
  • 27
3
votes
1 answer

Simple plot with pgfplots and LaTeX

I've just been searching like an hour on how to draw a simple function in LaTeX, for example f(x)=x^2. The examples I've tried did not work for some unknown reason, most probably because pdflatex would not start gnuplot (the -enable-xxx options do…
hochl
  • 12,524
  • 10
  • 53
  • 87
3
votes
1 answer

minimal working example of tikz usage in bookdown?

i have been trying to implement a tikz chunk in bookdown first by myself, then by following this thread. unfornutately, i keep running into various errors and incompatibilities, such as this one: Error in tools::texi2dvi(texf, pdf = !to_svg, clean…
alinart
  • 31
  • 2
3
votes
3 answers

Latex / Tikz: draw a vertical line to a straight line

Maybe you can help me, I try to draw a line from a Point/Coordinate to a straight line. I use Tikz to draw. \begin{tikzpicture} \coordinate [label=left:$A$] (A) at (-5,-5){}; \coordinate [label=right:$B$] (B) at (5,-5) {}; …
zwerg4
  • 320
  • 3
  • 5
  • 12
3
votes
0 answers

How to troubleshoot a tikzDevice error in running command?

I'm trying to use the R tikzDevice package in a Mac OS X system to enable clickable images in a PDF report. To that end I use the code of the answer How to have a clickable picture in a PDF created using pictureGrob? included here for…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
3
votes
1 answer

Tikz axis chart outer columns cut off

The outer columns of the following charts are cut off although the diagram is wide enough (axis line style). Setting the diagram's width does not help either. Any idea? What do I need to set or enlarge when I increase the bar…
Sir Tobi
  • 142
  • 1
  • 8