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
2answers
180 views

A collection of the actual smartphones

Considering the recent excellent questions that I've really enjoyed Welcoming 2019 Pi day: How to draw the letter π? and What has been your most complicated TikZ drawing? I have carefully observed ...
3
votes
2answers
50 views

How to fade a semiplane defined by line?

With the following code: \documentclass[tikz]{standalone} \usepackage{tkz-euclide,tkz-fct,amsmath} \usetkzobj{all} \begin{document} \begin{tikzpicture}[anchor=center] \tkzInit[xmin=-1, ...
0
votes
0answers
51 views

Why are my characters overlapping?

As a test of what's going wrong with a longer LaTeX file I've written, here is what I tried: \documentclass{article} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture} \draw (0,...
3
votes
1answer
31 views

Adding a shaded region between two curves on a PGFPLOTS graph

Ok, Say we have a graph defined as \begin{center} \begin{tikzpicture} \begin{axis}[ axis x line=middle, axis y line=middle ] \addplot[black,domain=-pi/2:pi/2]{cos(deg(x))}; ...
8
votes
2answers
517 views

How to make a label in a square in TikZ?

I have a code like this: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.5] \draw (0,0)--(12,0)--(0,5)--cycle; \draw (60/17,0)-- ++(0,60/17) -- (0,60/17); \end{...
5
votes
2answers
34 views

pgfplots: How to align plot width to same width as legend?

The user marmot has posted a nice approach to put a legend below a multigraph diagram. Minimum Working Example (MWE): \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{...
64
votes
22answers
7k views

Welcoming 2019 Pi day: How to draw the letter π?

First of all: don't forget that exactly 140 years ago, Albert Einstein was born; but exactly one year ago, Stephen William Hawking passed away. What a special day for science! Question How to ...
4
votes
0answers
25 views

Misplaced path using -| or |- with decoration (e.g. snake)

If I draw a path with the -|(horizontal-first-then-vertical) or |- (vertical-first-then-horizontal) commands and decorate the path with the snake-morphing operation, the latter half of the path is ...
6
votes
5answers
126 views

Regular polygon VS circle shapes in TikZ

This question is a kind of continuation this answer. There, it remains unclear which is the origin of the white space around the node content, if a square shape is used, and I would like to understand ...
4
votes
1answer
18 views

Pgfplot - How to exactly align the legend in a plot

I have a legend in my pgfplots and want to manually position it at a point where the legend does not cover any text or measurement points. I know the axis property legend pos=north west, but it's not ...
2
votes
1answer
29 views

Chose color in a \fill tikz

Simply, I am drawing a dot in a 3D tikzpicture using \fill (x,y,z) circle [radius=3pt, <somecoloroption>] How can I change its color? None of fill=red,draw=red, just red changed the color, ...
3
votes
4answers
194 views

put a square for 90 degrees angle

How should I put a square for 90 degrees angle? my code is; \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1.3] \draw [->, ultra thick, grey](0,-6)--(0,6) ...
0
votes
0answers
15 views

pgfplots: Is “scale only axis” only necessary for documents but not for standalone?

Assumed we have this kind of code: Minimum Working Example (MWE): \documentclass{article} \usepackage{showframe} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[height=\...
5
votes
1answer
75 views

From table to tikz

How do I go about creating the following table in tikz? \documentclass[11pt]{article} \usepackage{multirow} \usepackage{geometry} \usepackage{tabularx} \usepackage{booktabs} \usepackage{ragged2e} \...
1
vote
1answer
26 views

Design an algorithm capable of predicting collisions to choose alternative path using `tikzpicture` environment

This is and addendum of a previous question: How to connect pics through a set of colorful arrows using tikzpicture environment. I would like to be able to draw arrows that do not overlap with nodes ...
0
votes
0answers
41 views

Is there a tikz command for showing people in a flowchart?

I need to show a group of people (sometimes women, sometimes men) in my flowchart. Is there any command for that?
3
votes
1answer
40 views

How to connect `pic`s through a set of colorful arrows using `tikzpicture` environment

This is and addendum of a previous question: How to determine nodes to reduce their length using tikzpicture environment, and we need to use this other question: Draw multiple arrows from one node to ...
1
vote
1answer
18 views

Using pgfplotstable inside tabular environment

Is there a way to get a table created with pgfplotstable inside another tabular environment. I'm trying to get multiple subtables in multiple columns. The following simplified version does not work. ...
1
vote
1answer
19 views

pgfplots: How to force datetime to only display xticks with even times (18:00) instead of odd times (18:34)?

Assumed we have the following plot from user darthbith to display a pgfplot with a time axis: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{...
3
votes
1answer
31 views

pgfplots: How to add time axis as second x-axis?

I preprocessed a series of data into a time column and a further column with time distance to zero, the latter as decimal value. Minimum Working Example (MWE): \documentclass[border=5mm]{standalone} ...
0
votes
0answers
25 views

tikz distribution and contour plot from seaborn

I have a generated a contour plot from 2 density estimations using seaborn. I want to reproduce the plot using tikz, but I don't find any resources. Any help would be appreciated. Thank you Edit: ...
0
votes
1answer
41 views

Creating a “circular” concept map

I want to know how to create a circular concept map (see the picture below) using TikZ, I know how to create linear concept maps or flowcharts, but I have no idea on how to do this. I haven't seen ...
0
votes
1answer
40 views

How to draw 2D dendrite shape with surface normal?

I found another answer to draw a smooth dendrite: draw a smooth dendrite I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. ...
6
votes
3answers
369 views

How to draw a matrix with arrows in limited space

I am trying to draw a matrix with arrows in it. It can't take up too much space however which stops the arrows from showing properly. \documentclass{article} \usepackage[margin=1cm]{geometry} \...
1
vote
1answer
44 views

CicuiTikZ Special Sources not recognised

In the package CicuiTikZ there are some special sources listed in the documentation, in section 4.2.9. For some reason I can't get them to work. Here is my code: \documentclass{report} \usepackage{...
1
vote
1answer
27 views

How to make tikz macro work with two arguments in this MWE?

I want to generate a table from a csv file using the very helpful tool datatool and insert a round photo of each person surrounded by a circle, the color of which should be taken from the provided csv ...
1
vote
1answer
16 views

tikzpicture with xbar interval and nodes near coords is missing an interval label

I'm trying to create an xbar interval chart with nodes near coords. This works with some shifting etc., but the interval label is missing for the topmost value (or the value is extra, depending on how ...
0
votes
0answers
27 views

Automatical graph layout with high number of connections using TikZ package

While learning to work with LaTeX, I have found out (also in this question) that TikZ is able to create very good automatic graph layouts. In my work, I had assignment to create pretty large ...
2
votes
1answer
22 views

Problem with inner sep and minimum height of TikZ node

Consider this code, which is a simplified version of this answer: \documentclass[tikz,margin=3mm]{standalone} \def\innersep{.3333em} \begin{document} \begin{tikzpicture}[every node/.style={draw,text ...
0
votes
0answers
29 views

Matlab2tikz // Error divsion by 0.0

I created a minimal working example in Matlab: [x,y] = meshgrid(-2:0.1:2,-2:0.1:2); fx = x.*y; fy = x.*y; figure quiver(x,y,fx,fy) matlab2tikz('plot.tex'); This works great and creates the plot....
1
vote
1answer
35 views

Spacing between tikz subfigures and subcaptions

I'm having trouble reducing the size between the subcaptions and their figures when adding the figures through tikz. I tried a negative \vspace as well as setting (or changing?) the \captionsetup{skip=...
13
votes
5answers
4k views

Creating a rainbow color macro

I'm trying to draw a picture in tikz whose code is generated by another computer program. The program outputs hundreds of numbers in between 0 and 100, and I'd like to color objects in the picture on ...
2
votes
1answer
25 views

Draw multiple arrows from one node to many others using a palette of colors

This is a continuation of a previous question: Draw a set of arrows using a palette of colors. What I want I want to draw multiple arrows starting from one node to more than one. Each arrow that ...
2
votes
1answer
47 views

Trying to write the equation in one single line in block

I am trying to put an equation in a block in one single line. But I could not able to do that. HOw to do this. This is what I tried. \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,...
5
votes
1answer
42 views

Need help with animated gradient

I am trying to get a nice gradient, but mine's a litte choppy. Maybe you can help me out with that. For a bette idea: (from top to bottom: luminosity, expansion speed, radius) animation.tex \...
1
vote
1answer
40 views

pgfplots: How to control and align legend items precisely above each other?

The user marmot has posted a really nice approach of adding legend items into one single box below a multigraph diagram by placing them inside a \node. Based on this initial situation I have tried to ...
1
vote
0answers
25 views

Conditionally include a line based on an option with pgfpackages

I am trying to design a small package, mostly for test purpose. Currently the package looks like this: % eqbox.sty \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{eqbox}[2019/01/01 Boxed ...
1
vote
1answer
77 views

Why does a vertical arrow get rendered incorrectly?

I am drawing a table with arrows in it. All the arrows are fine except for vertical ones pointing down. Here is a MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{...
0
votes
1answer
41 views

Trying to draw a picture w/ this code on tikz but keep getting an undefined control sequence error at the start of the 'node' line? Anyone know why?

I have tikz loaded in the preamble with these libraries \usetikzlibrary{automata, positioning, arrows, positioning, calc} \begin{tikzpicture} \tikzset{level distance=15pt} \foreach \r in {0.5,1,1....
1
vote
0answers
24 views

Sum of sub-bars on top of stacked bars in tikz

I want to be able to display the sum of the values on top of the bars. Below is my code and under that, an illustrated image that displays the values I want to show. Can this be done? \documentclass{...
2
votes
1answer
23 views

Changing line width in tikz makes arrow heads ignore size specification?

I am having trouble in changing arrowhead parameters in Tikz. The length and width parameters from arrows.meta work as expected until I also specify a line width, then all my arrowhead specifications ...
2
votes
1answer
56 views

Could someone make this figure, but with homoskedasticity?

The amazing, elegant graph below is from this post. Could someone help me make this same graph, but with homoskedasticity (instead of heteroskedasticity)? Perhaps Jake? Thank you, Jake, for the ...
1
vote
1answer
19 views

Specify times and dates in Pgfplots

I have x-data as dates associated with float values; plotting them with pgfplots is as easy as \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \pgfplotsset{compat=...
6
votes
1answer
54 views

Draw a set of arrows using a palette of colors

I am involved in a project that includes the creation of arrows. Making a monocolored figure is a visual problem due to the scarcity of colors, so I came to design a solution that is as automatic as ...
6
votes
1answer
549 views

Bohr's Model - Can we draw the electrons in pairs?

Can we draw the elctrons as pairs as shown... \documentclass[border=5mm]{standalone} \usepackage{bohr} \begin{document} \bohr{10}{P:10} \end{document}
3
votes
3answers
442 views

How to draw a rectangle shaped arrow-jigsaw with bullets below

Like this, with multicolor shades of blue Thanks!
1
vote
1answer
21 views

pgf-pie - Show absolute values instead of percentage

I want to make a pie chart with pgf-pie that shows not the percentage inside the pie but the absolute values. For example 15 males and 3 females in my example below. Is this possible with pgf-pie? \...
1
vote
3answers
63 views

Better use of rounded corners of links from multiple nodes to multiple nodes with tikz on \draw[->]

My question follows one of my previous questions. Here's my current code: \documentclass[tikz,border=5mm]{standalone} \usetikzlibrary{matrix,positioning} \newcommand{\multilinkstoonenode}[3]{ \...
2
votes
1answer
27 views

I can't use a saved dimension in an anchor into a loop

I have the following problem: Into a \pgfdeclareshape I have the following code for a saved dimension: \saveddimen{\long@sal}{ \pgf@x=\pgfkeysvalueof{/tikz/longitud salidas}\unidad@medicion \...
3
votes
1answer
56 views

Why this tikzpicture does not appear centered?

While creating a state machine diagram with tikz I noticed that it appears to be off center. This result seems counter intuitive to me because of the way the diagram was created, using a foreach ...