Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-pgf]

TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

3
votes
1answer
19 views

Unwanted gap between top margin and text caused by tikzpicture overlay

I have the following code based on atbegshi, tikz and a boolean switch to insert pages with a sidebar: \documentclass[a4paper]{article} \usepackage[margin=1.0cm,noheadfoot,showframe]{geometry} \...
1
vote
0answers
20 views

Tikz .tex file for a ggplot image made in R won't render as pdf in my tex document (but no compile error!)

I'll preface by saying that I'm not sure whether this is better off posted in StackOverflow, and I'd be happy to move it over there if that turns out to be the case. tl;dr I followed the ...
1
vote
0answers
16 views

Problems with tcolorbox and TikZ external

I am writing a book which will contain a lot of TikZ figures and tcolorboxes. To speed things up I want to use the TikZ external library. However, I have run into some problems that I would like to ...
4
votes
1answer
45 views

Continue tikz picture on next page

I want to place a node of a tikzpicture depending on a node of a previous tikzpicture. MWE: \documentclass[a7paper]{scrartcl} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \...
1
vote
1answer
10 views

pgfplots: How to set xticklabel date year as YY instead of YYYY?

By default, xticklabel = \month/\year, will be displayed as 04/2019. However, I want to display it as 04/19 instead of 04/2019. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{...
5
votes
1answer
46 views

tilt a tikz shading

I'm trying to draw a band with a shading over a whole page. This band should have a small angle of 15° from west to east. But I seem to be unable to give the shading the "correct" angle too. How can ...
5
votes
1answer
140 views

tikz: drawing arrow

How can I make the left vertical lign arrow-style as the right one? \documentclass[tikz,border=3.14mm]{standalone} \begin{document} \begin{tikzpicture} \draw[->] (0,3) -- (0,0) node[below] {$0$} ...
3
votes
1answer
34 views

pgfplots: How to set xticklabel as two line?

I want to design xticklabels as two line texts: First line: Date, e.g. \month/\day Second line: Time, e.g. \hour:\minute Minimum Working Example (MWE): \documentclass{standalone} \usepackage{...
0
votes
1answer
39 views

Drawing plot of a function with a fraction power

How to draw curve of $y=(6x+2)^{\frac{1}{3}}$ in domain $-1:3$ with tikz? \begin{tikzpicture}[scale=1,line join=round, font=\footnotesize] \coordinate[label={[rotate=28,shift={(.3,-.05)}]above:{$A(1,...
5
votes
1answer
310 views

Draw a pulley system

Consider: I need to draw a pulley system as in the figure. How can I do that? \begin{tikzpicture} \fill[pattern=north east lines] (-3,0) rectangle (3,.3); \draw(-3,0)--(3,0); \draw(-2.5,...
1
vote
1answer
34 views

Add a vertical bar to specific pages using TikZ

I use a template that creates a document with two pages. The first page has a vertical bar and the second page has a horizontal bar. I would like to extend this template in order to add an arbitrary ...
4
votes
1answer
45 views

TikZ random messes with coordinates

I'm trying to draw random points in a polar coordinate system with lines leading down to a circle. This is absolutely straightforward, but the result is not as expected. There seems to be an ...
-1
votes
1answer
50 views

Plotting over/underfitting graph with TikZ package

I am trying to find a way of illustrating supervised learning good/over/under-fitting, like:
4
votes
1answer
44 views

rearrange tikz dashed rectangle blocks

I have the following tikz code: \documentclass[crop,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning} \usetikzlibrary{arrows, chains, ...
1
vote
1answer
32 views

pgfplots: Are parentheses mandatory in axis environments?

Assumed we have this little code snippet: \begin{tikzpicture} \begin{axis}[ date coordinates in = x, table/col sep = semicolon, date ZERO ...
-1
votes
0answers
30 views

Can not complete Block Diagram

By using this code can not completed block diagram as required \begin{landscape} % Define block styles \tikzset{ desicion/.style={ diamond, draw, thick, text width=4em, text badly ...
7
votes
3answers
642 views

How does TikZ render an arc?

With the sample MWE below, TikZ generates the following diagram: 1. Drawing an arc \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate[label=below:$a$] (a) ...
7
votes
2answers
884 views

Simple Line in LaTeX Help!

I'm working in a project for university using latex and i'll make a gif explaning the radians of math! And I really dont know how to make this type of line (i'll put the example below) !! Plz help me ...
3
votes
2answers
58 views

A `\coordinate` command ignored

$\triangle[ABC]$ is a 30-60 right triangle, and its right angle is at C. A is at the origin. A circle is inscribed in it; its center is at O = (2*sqrt(3)*(sqrt(3) - 1), 2*(sqrt(3) - 1)) and its ...
1
vote
0answers
28 views

pgfplots: Best practice to avoid “TeX capacity exceeded” when plotting huge data sets?

I want to create some huge pgfplot with three different axis and a lot of data points. In summary there are 20160 lines of data existent. My problem is: All few hours the values will change ...
3
votes
1answer
65 views

Drawing a ribbon graph

Given a graph like the one on the right side of the picture below, I want to draw a ribbon graph (that is, a "thickened" version of the graph) like the one on the left. I already drew the graph using ...
1
vote
1answer
29 views

pgfplots: Using “x filter” to decrease point density of plot

The user esdd has posted a nice approach on how to increase point density for a certain range of data points while the remaining plot keeps low point density by using x filter. Minimum Working ...
1
vote
1answer
34 views

How to make a simple line with two sided arrow? [duplicate]

\documentclass[aps,amsmath,article,amsfonts,11pt]{revtex4} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{epsfig,graphicx} \usepackage[english]{babel} \usepackage{amsfonts} \usepackage{...
1
vote
1answer
112 views

How to draw this diagram/graph using tikz?

I have this diagram, and I have tried to draw it doing every dot and line, but I was wondering, is there a way to do it with foreach cycles or something like that? thanks.
1
vote
1answer
34 views

Adding Labels and arrows in Tikz graph

I'm trying to do something similar to this epsilon-delta graph I've found. Specifically, I'd like to copy the placements and arrows, like the L+e and L-e coming out of L. Same thing with the x0 + d ...
1
vote
1answer
32 views

Modifying arcarrow

I have found this PDCA cycle (plan, do, check, act) here http://www.texample.net/tikz/examples/pdca-cycle/ % PDCA cycle % Author: tikzanfaenger, Helmut, and Bartman \documentclass[tikz,border=10pt]{...
0
votes
0answers
60 views

Stata, Python, MS office logos (wordmark/typeset) in LaTeX list or TikZ?

Curious if anyone has built Stata, Python, or MS Office logos/wordmarks/typeset in LaTeX or TikZ? For example, this has been nicely done for R here: New R Logo with Tikz Similar to hologo and dtk-...
9
votes
3answers
129 views

Draw 4 of the same figure in the same tikzpicture

I want to draw this: I have managed to do one of the Hexagons using this code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \begin{tikzpicture}[scale=2,cap=round,>=...
4
votes
1answer
295 views

Drawing spherical mirrors

What is the best way to draw 3D spherical mirrors like these on tikz?
1
vote
0answers
23 views

Evaluate/round a mathematical expression using \input

I want to evaluate a mathematical expression using a number from a different latex document. In this case, number.tex consists of a single number (e.g., 40) that has been exported from a statistical ...
4
votes
1answer
66 views

How do I recreate this two-column TOC layout with chapter goals on the left and TOC on the right

Recently I have been looking through Till Tantau's (the creator of TikZ) script on logic (see here). He uses a beautiful layout at each beginning of a chapter. So I want to recreate the little "...
1
vote
1answer
22 views

How to remove Tikz pgfplot ticks from the top, bottom and right borders?

I am creating a histogram, which I've managed to do with the following code: \begin{tikzpicture} \centering \begin{axis}[ ymin=0, ymax=50, minor y tick num = 2, axis background/.style={...
4
votes
3answers
122 views

Dyck paths with extra diagonals from valleys (Laser construction)

I would like to create a Dyck path in Latex with two additional features. First, I would like to number all the East step except(!) for the last one. Secondly, for each valley (that is, an East step ...
1
vote
1answer
19 views

How to change the label format on x-axis of Tikz pgfplot?

I am trying to make a nice looking histogram of my data, and have managed to produce the following so far: \begin{tikzpicture} \centering \begin{axis}[ ymin=0, ymax=8000, minor y tick num = 2,...
1
vote
1answer
52 views

Mindmap diagram in Beamer

What is the proper way to include a mindmap in Beamer like the following one (adapted from here http://www.texample.net/tikz/examples/computer-science-mindmap/)? Should insert with includegraphics ...
0
votes
1answer
38 views

Modifying a timeline in beamer

I have found the code in this selected answer of this questions How can I make a standard timeline? and I modified it to achieve what I want. \documentclass[svgnames]{beamer} \usepackage[french]{...
5
votes
3answers
84 views

Matrices and TikZ : positioning a table

The idea is to reproduce the figure identically. I played to find the positioning of the blocks of text: is there a more elegant way ? \documentclass[border=10pt]{standalone} \usepackage{tikz} \...
4
votes
2answers
93 views

draw dynamic circle around node and edges

How do I add the red circle as shown in below image but with dashed line circle. I want it to follow the path structure. So far, this is my code: \begin{forest} [$root : s_0$ [$a: s_*$ [$d: s_*$] [$...
6
votes
3answers
529 views

How to draw/optimize this graph with tikz

I would like to know if is there a way to optimize the code that I use to draw the next graph: I do it using this: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{figure}[h]...
5
votes
1answer
126 views

I want to complete my figure

This is my very simplest MWE, I honestly say that I haven't done anything new. \documentclass{article} \usepackage{tkz-euclide} \begin{document} \begin{figure}[h] \begin{tikzpicture} ...
0
votes
0answers
28 views

My figures has disappeared after using tikz picture in overleaf [on hold]

I have been writing notes to my Calculus I course. These notes include some figures that I constructed using Geogebra, then I upload to my overleaf account. This week I decided to learn more about ...
1
vote
2answers
53 views

Creating an environment

I'm trying to create an environment. The code below performs something similar to what I want. My difficulty is in adjusting the content that will stay within the environment. I would like to reduce ...
0
votes
1answer
59 views

Intersecting a sphere with a line

I would like to replicate the following image in Tikz. Would anybody be able to help me? I've heard that drawing spheres and lines with good coordinate systems are hard...
1
vote
1answer
65 views

Grid in pattern in TikZ

Referring to the answer in How do I fill this area with inclined parallel lines , the pattern is generated with grid lines as well. I am not able to understand the behavior. \documentclass{article} \...
2
votes
1answer
67 views

Direction of Arrows in TikZ

The following TikZ code is for the preparation of flowchart. \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{shapes,shadows,arrows} \usepackage{lscape} \begin{document} \tikzstyle{...
2
votes
1answer
35 views

Two parallel lines between nodes of arbitrary size and position

I would like to draw two parallel arrows between two nodes in TikZ. The difficulty is that the nodes can be of any size and can be arranged in any order. Related: The question Parallel arrows ...
2
votes
1answer
62 views

Square-tiling a torus

I want to use tikz to draw something similar to this: https://www.youtube.com/watch?v=O7qsB5boS7s That is, we tile the tore with squares, we cut it open, twist it and then glue it back again. The ...
0
votes
1answer
20 views

Removing ticks from top, bottom and right-hand side of column chart and rename x-axis labels

I am trying to make a nice looking histogram of my data, and have managed to produce the following so far: \begin{tikzpicture} \centering \begin{axis}[ ymin=0, ymax=8000, minor y tick num = 2,...
1
vote
1answer
26 views

arrow across two tree Tikz

How do i add the dash line between two tree as in image below, \begin{center} \begin{tabular}{p{4cm}p{4cm}} \tikzset{my dbl/.style={double,double distance=2pt}} \centering \begin{forest} for tree={...
2
votes
1answer
37 views

How do I fill this area with inclined parallel lines

I have achieved the following: with the below code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) ...