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.

2
votes
1answer
6 views

Setting minor ticks with log scale axis PGFPlots

Consider this MWE: \documentclass[border=5mm]{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} [width=15cm,height=10cm, xmode=log, xmin=20, xmax=20000,...
1
vote
1answer
14 views

How to add a caption to a picture which already fills out the whole frame?

In my slideshow, I have a picture which needs a caption but for better looking I want it to be in the original ratio. Therefore the size of the image is defined as width=\pagewidth and height=\...
3
votes
0answers
19 views

Beamer, overlay and standalone

Short version Is it possible to use standalone to produce externally my figures with overlays and include them directly in my main document ? More details Using the answers of the question Beamer ...
2
votes
1answer
31 views

Frame with caption and image below

I want to create a slideshow. For some slides I want to have a caption above the image but the rest of the slide filled with the image. How is this possible? Maybe with \usepackage{tikz}? If so, could ...
4
votes
1answer
55 views

Tikz positioning above circle exact alignment

How can the balls b1 and b2 be aligned exactly above each other? Also, above=1cm of b1.center, anchor=center and all kinds of combinations with north - south, north east - south west does not yield ...
0
votes
1answer
21 views

Tikz figure in Table

Here is my code: \documentclass{article} \usepackage{fullpage} \usepackage{pgf-pie} \usepackage{tabularx} \usetikzlibrary{decorations.text} \usepackage{ifthen} \begin{document} \begin{table}[ht] %\...
4
votes
2answers
297 views

Drawing a german abacus as in the books of Adam Ries

I am teaching a course in history of mathematics and would like to draw something like the following: The bullet points should be possible to draw on the lines and in between. Can anyone help me? ...
2
votes
0answers
14 views

Tikz-dependency and gb4e Alignment Issues

I am using tikz-dependency and gb4e inside one example. I want them to be centered, but I could not managed to do so. Here's my self advancement: \documentclass{article} \usepackage[utf8]{inputenc} \...
1
vote
0answers
41 views

TikZ: Piping and instrumentation diagram (P&ID) shapes available?

To draw electrical wiring schemes in TikZ the nice package circuitikz is available. However, is there something similar existent for drawing piping and instrumentation diagrams? Example of such a ...
3
votes
0answers
67 views

How to draw organometallic compounds?

I'm trying to draw this molecule using the chemfig package but honestly don't know where or how to start. Please help. Thank you. \documentclass{article} \usepackage{chemfig} \setcrambond{3pt}{}{} \...
2
votes
1answer
41 views

What units are \pgfphysicalheight and \pgfphysicalwidth defined in?

I often use \pgfphysicalheight and \pgfphysicalwidth from the pgfpages package to define sizes dynamically based on the dimensions of my page (which vary). For example, here's a "dynamic" vertical ...
0
votes
0answers
21 views

Tikz node with a fixed and variable coordinate

In Tikz: how can I place a node A relative to the position of node B but with one coordinate fixed? Or put differently, how can one make two nodes share either the x or the y coordinate? For example, ...
3
votes
2answers
66 views

How to properly capture return value of a command?

I have a problem with capturing returned value of my command. Here is my preamble with command definition: \documentclass[convert={density=300,size=800x600,outext=.png}]{standalone} \usepackage[utf8]...
6
votes
4answers
428 views

How can I make a line end at the edge of an irregular shape?

I created an irregular shape (below the Service rectangle) using the \draw command. As part of a diagram I like to have an arrow point to the shape as seen below. The arrow currently ends a bit above ...
0
votes
1answer
20 views

Stack two tables with 'tikzpicture' aligned left and right

I modified this example to have two tables stack upon another. I do get Dimension too large. }; and have trouble anchoring/aligning the nodes. Additionally, it sometimes compiles with things in the ...
5
votes
2answers
121 views

yticklabels on the right side of yaxis

Good morning! How can I put the yticklabels on the right side of yaxis? (Not in the right side of the picture, like here) This is the code that I use: \documentclass{standalone} \usepackage{...
0
votes
1answer
40 views

Draw lines without arrows between nodes

The answer referenced is https://tex.stackexchange.com/a/45735/180050 and is essential for this question. In the given answer, it shows how you can easily make directed edges between specified nodes. ...
0
votes
0answers
29 views

Anyone have any Idea on how to plot flow streamline from velocity data using pgfplot

I have velocity data from my simulation, anyone have experience in plotting flow streamlines using pgfplot. I have data in the form; x y z u v w
5
votes
2answers
190 views

Stretch a Tikz tree

I have this beautiful tree, but I have not been able to stretch it. Specifically I want to increase the distance between the first and second children and their grandchildren. Any suggestions? \...
0
votes
1answer
26 views

Plot surface and normal vector fields

I was wondering if there is an easy way to plot a mesh diagram of a surface and also its normal vector field? For example: I wish to plot the sphere $x^2 + y^2 + z^2 = 1$ and the normal vector field ...
0
votes
1answer
91 views

How to draw the following diagram?

I got help from enter link description here but I was wondering how can I re-purpose the code to get the diagram as in the attachment. \documentclass{article} \usepackage{graphicx} % to add figure ...
1
vote
1answer
14 views

Create more space between each arrow between nodes

How can I make the arrows I draw slightly fatter arrows that are also further apart from each node I have? edit: Is there also a better way then searching TexStackExchange to figuring this stuff on ...
3
votes
1answer
30 views

Making a right-angle mark using the `calc` package in `TikZ` [duplicate]

I have a right triangle and the altitude from the vertex of its right angle drawn. A=(-4,0), B=(0,3), and C=(0,0) are the vertices of the triangle, and F=(-36/25,48/25) is the foot of the altitude on ...
2
votes
2answers
51 views

Place `tikzpicture` on the left of the text

Background I’d like to write a LuaLaTeX document for the Roman Catholic Liturgy of the Holy Week (from the Psalm Sunday through Easter Sunday). I do this in Slovak language (here’s a pdf that uses ...
1
vote
1answer
16 views

Getting bounding box of axis and colorbar

I want to place my legend centered above the axis and colorbar, but I can't find the correct bounding box. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \...
1
vote
1answer
44 views

Tikz rectangle in perspective

I would like to draw a rectangle in perspective which looks like this \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,1) -- (0,3) -- (2,5) -- (2,3) -- cycle; \...
2
votes
2answers
130 views

Tikz - create rectangle with same width as the picture

I have the following MWE: \documentclass[]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,fit,shapes.geometric,calc,backgrounds} \begin{document} \begin{tikzpicture} % Headers \...
0
votes
0answers
26 views

Specific PDF not viewable in TeXstudio

PDF produced from the following example, by Xe- or LuaLaTeX, is not viewable in (internal pdf viewer of) TeXstudio. \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw (0, ...
3
votes
1answer
30 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} \...
2
votes
0answers
25 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
21 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
59 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
15 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{...
6
votes
1answer
66 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
170 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
37 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
44 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
334 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
38 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
48 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
51 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
48 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
33 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
33 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 ...
8
votes
3answers
709 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
924 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
60 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 ...
2
votes
0answers
48 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
66 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 ...