New answers tagged

1 vote

Plot graph with labels

Using tzplot: \documentclass{standalone} \usepackage{tzplot} \begin{document} \begin{tikzpicture}[x=.1cm,y=.01cm,font=\scriptsize,label distance=-5pt] \tzhelplines[xstep=5,ystep=50,solid,gray!25](...
user avatar
  • 2,490
0 votes
Accepted

TikZ Causal Graph Details (bold, arrow positions, text above paths)

Let's see: to have multiline nodes, you have to specify an align key; to have automatic line breaks, you need a text width to change the font of the node you can use the key font to add text around ...
user avatar
  • 30.4k
1 vote

TikZ Causal Graph Details (bold, arrow positions, text above paths)

As commutative diagram: \documentclass[border?3.141592]{article} \usepackage{amsmath} \usepackage{makecell} \usepackage{tikz-cd} \tikzcdset{ arrow style = tikz, arrows = {>=Straight Barb, ...
user avatar
  • 255k
7 votes
Accepted

Draw boxes around nodes in tikz

Use fit library and also don't forget to use rotate fit command to allow the non horizontal fitting. I also changed a bit your main nodes description to let you have all nodes the same size. \...
user avatar
  • 16.6k
5 votes
Accepted

How to draw "ring-like" graphs?

Each arc is obtained through the path attribute perp circle that is defined at the beginning; it draws a circle perpendicular to a reference circle (the black one in the first drawing) and it depends ...
user avatar
  • 2,999
2 votes

How to draw "ring-like" graphs?

Unless your graph is a well known graph or has just a few edges there isn't an easy way to produce many graphs quickly because the specific edges have to be included one by one. For 20 vertices I can ...
user avatar
  • 11.4k
3 votes
Accepted

Plot graph with labels

This is a long comment with my suggestion of using Asymptote (can be imbbed into LaTeX). For the first figure, there is a lack of information of the function P(t). What is the analytic formula of it? ...
user avatar
2 votes
Accepted

TikZ graph with nodes crossed out

You can define macros to draw the crosses in the nodes. For example, \newcommand{\snode}[1]{\draw(#1.45)--(#1.225);} Then if you have a circular node (node1), you can call \snode{node1} inside a ...
user avatar
  • 21.5k
2 votes
Accepted

tikz graph with boxes

Try this code: \documentclass{beamer} %layout \mode<presentation>{ \usetheme{Madrid} } \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{frame} \frametitle{Diagramm} \begin{...
user avatar
1 vote
Accepted

How to make edges parallel

One quick workaround is to change the following lines \draw (Q2) edge [auto rotate, above] node [pos = 0.5] {$b$} (Q4); \draw (Q4) edge [auto rotate, below] node [pos = 0.5] {$a$} (Q2); to \draw (Q2) ...
user avatar
  • 849
1 vote

Reposition graph edges

Based on my answer on the your previous question: \documentclass[tikz,12pt,border=1mm]{standalone} \usetikzlibrary{arrows.meta, automata, positioning, quotes, ...
user avatar
  • 255k
2 votes
Accepted

How to make this type of graphs used to talk about regular rooted trees?

For the first figure, I suggest using forest. Use name= to name the nodes. Then you can use ordinary tikz commands at the end. \documentclass{article} \usepackage{forest} \usetikzlibrary{decorations....
user avatar
  • 21.5k
1 vote

Reposition graph edges

Your code is overly complicated. Just \draw from (V) to (V) and set in= and out= angles, together with looseness. \draw (V)to[out=250, in=290, looseness=3]node[below] {$a,b,c$}(V); \draw (Q2)to[out=...
user avatar
  • 21.5k
1 vote
Accepted

Reposition graph edges

As commented by @frougon. This is a way to do it: \documentclass[tikz,12pt,border=1mm]{standalone} \usetikzlibrary{automata} \usepackage{amssymb} \begin{document} \begin{tikzpicture}[ ->, >=...
user avatar
  • 4,578
7 votes
Accepted

How to do graph in LaTeX

Change the value 2 in \resizebox{2\textwidth}{!}{...} to automatically resize the diagram. \documentclass[border=3.14mm]{standalone} \usepackage{tikz} \usetikzlibrary{automata, arrows.meta, ...
user avatar
1 vote

Change vertex and edge style

A variation of the first version of @frougon's answer. By defining state style as ellipse the MWE become more concise and clear: \documentclass[tikz,12pt,border=1mm]{standalone} \usetikzlibrary{arrows....
user avatar
  • 255k
3 votes

How to make this type of graphs used to talk about regular rooted trees?

Follow the suggestions of Alan Munn for the first graph. For the others graphs try this code: \documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=...
user avatar
1 vote
Accepted

Change vertex and edge style

Edit: thanks to Zarko's answer (+1), I realized that I had not tried the obvious ellipse style (or shape=ellipse) correctly: I had only tried \node[ellipse, state, ... which doesn't give the expected ...
user avatar
  • 22.9k
0 votes
Accepted

How can I make this figure fit on the page, without going over the margin?

Solution #1: Decrease the margins Suggested replacement of Line 2: \usepackage[left=1cm, right=1cm]{geometry} This shrinks the margins of the page on the left and right, making more space for your ...
user avatar

Top 50 recent answers are included