Stack Exchange Network

Stack Exchange network consists of 174 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
2answers
28 views

Modify the code of the example Plane partition by Jang Soo Kim from “texample.net”

From the answer to this question, is it possible to make a lower cube position void, to create this drawing \documentclass{beamer} \setbeamertemplate{navigation symbols}{}% to suppresses (hide) ...
1
vote
1answer
16 views

Why double-headed arrows when the direction of node is specified?

I am quite puzzled when drawing the connection of nodes. \usepackage{xcolor} \definecolor{darkblue}{HTML}{1F4E79} \definecolor{salmon}{HTML}{FF9C6B} \tikzstyle{cell} = [rectangle, minimum width=1cm, ...
8
votes
2answers
150 views

How to properly smuggle (with or even without TikZ)?

I am seeking to find something that allows me to "broadcast" macros outside a group. Concrete examples include paths and scopes in tizpictures. Here is an M(N)WE. \documentclass[tikz,border=3.14mm]{...
4
votes
1answer
48 views

How to draw cylinder and cone to finish this drawing?

After a lot of attempts without success, I am asking here: How to draw a cylinder connecting the two circles? How to draw a cone from point A to the nearest circle? \documentclass[tikz,border=5pt]{...
3
votes
1answer
47 views

Fill background of a plot depending on different/third column

I have a time series with values for x0 and x1. Depending on their distance, the system is in a specific state. Whenever the system is in the state 1, this should be highlighted with a colored ...
3
votes
1answer
42 views

Is there a command to find coordinates of projection of a point on a line in 3D?

Sometimes, I need determine coordinates of projection of a point on a line in 3D. I know The Syntax of Projection in 2D at 13.5.5 The Syntax of Projection Modifiers at Manual for Version 3.1. This ...
5
votes
1answer
59 views

How to generate a xy diagram with multiple grouped data sets?

Based on the answer of Stefan Pinnow in 'How to group several charts into one chart?', I tried to generate a diagram with multiple grouped data. Therefore, I modified the diagram but I have some ...
4
votes
1answer
84 views

Exam class: TikZ-circled choices not aligned to hanging indent

I am typesetting a competition examination paper, and I wanted to satisfy a very specific requirement for the multiple-choice questions: five choices, each with capital letter choice labels all in ...
2
votes
2answers
154 views

can you help for diagram for in latex?

\begin{tikzcd} 3 \arrow[dr] & \\ 4 \arrow[r] & 2\arrow[dr] & \\ 1 \end{tikzcd} could you help me? how do yo writting latex?
1
vote
1answer
33 views

TikZ PGF: How to develop cell values for 3D graph?

Currently there are some awesome pgfplots around here. I think about something like this one: Minimum Working Example (MWE): \documentclass[border=5mm]{standalone} \usepackage{pgfplots, filecontents}...
1
vote
0answers
32 views

TikZ node text color not working with latest MiKTeX release [duplicate]

Please consider the following MWE: \documentclass{article} \PassOptionsToPackage{usenames,dvipsnames,svgnames,table}{xcolor} \usepackage{xcolor} \usepackage{tikz} \begin{document} \par Text before ...
2
votes
1answer
33 views

Length of matrix delimiters using TikZ

I'm trying to explain the Sarrus method and to draw the lines between nodes I'm using the tikz and matrix packages. However, when the delimiters are not parentheses but vertical bars (and also ...
0
votes
0answers
44 views

How to draw manifolds charts with TikZ?

I'm quite new to TikZ, so I would love to get some help with the drawing! What I intended to draw was not exactly what is shown in the picture, as that is probably not possible. I only want to draw a ...
1
vote
1answer
25 views

Align node name in Tikz

I am trying to align the name of a node to the top left of the rectangle. Left alignment in TikZ (and a few other posts) mention to alter the text width parameter, but this had no effect when used in ...
3
votes
3answers
37 views

Tikz: Calculate position based on node using fit option

I want the nodes c and d be inside q and the position of q to be determined by p. A second problem is, that the distance between p and q isn't correct even with on grid=false (I guess the width of p ...
-2
votes
0answers
81 views

How to draw textured shapes in tikz?

Help me how to draw this picture in tikz? \begin{tikzpicture} \definecolor{zzttqq}{rgb}{0.6,0.2,0} \fill[line width=2pt,color=zzttqq,fill=zzttqq,fill opacity=0.1] (0,2) -- (-1.98,0) -- (0,-2) -- (2,...
1
vote
1answer
35 views

Tikz: Globally set an inner separation for labels

Instead of defining the inner xsep for every node (like in b), I would like to set this globally. \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[label above/.append style={...
1
vote
2answers
29 views

Draw edge with in and out angles but shift the center

I have a path from a to f that I want to exit a at 0° and enter f at 180°, but, as there is an obstruction b, I would like to shift the center to the left, or somehow have the path descend earlier. \...
0
votes
0answers
23 views

How can I add arrows onto gnuplot contour plot?

I have a contour plot for a doublet flow, but I'm trying to add arrows onto the contour plots. \begin{axis}[ xshift=8cm, ticks = none, view={0}{90}, xmin = -1, ymin = -3, xmax = 5, ...
3
votes
1answer
68 views

Cubes drawing code modification

The following code from this example (Plane partition by Jang Soo Kim) has 2 faults, I could not figure out how to overcome them. Firsty, the value 0 equals to value 2; i.e. value 0 draws 2 cubes. ...
2
votes
1answer
48 views

How to show the origin $O$ in a tikzpicture graph

This could be a silly question, but how would you modify the codes below to show the origin $O$ without change the xmin and ymin values? The following is the resulting graph from the code. \...
1
vote
2answers
38 views

Header rule doesn't pass over the margins

I am trying to customize the header rule using fancyhdr and tikz packages. I wish the rule could overpass the margins. In order to do so I thought that drawing a line with tikz from (-1,0) to (18,0) ...
1
vote
2answers
84 views

add straight lines to parity plot

I have the following figure in LaTeX: And I want to add the error lines (+5%, 0% and -5%) present in the following figure: Can anyone help me please? My MWE is: \documentclass[11pt,paper=a4,BCOR=...
1
vote
1answer
31 views

Follow-up: Improving typesetting of striking out terms in equations

This is a follow-up question to my earlier question about Improving typesetting of striking out terms in equations. The solution proposed by @marmot works well, but I have to make more manual ...
2
votes
2answers
57 views

Hierarchical diagram in tikz/forest - level options

Based on this hierarchical diagram in tikz using the forest package, i wanted a modified version of it. Currently i have \documentclass[tikz,border=10pt]{standalone} \usepackage{verbatim} \usepackage{...
6
votes
1answer
177 views

How can I give this perspective with Tikz?

I am trying to complete the image of the figure: I know how to perform the dashed circle and the legs of the table. The problem is to draw the upper part of the table. Can you give me a hint of how to ...
2
votes
0answers
35 views

torn paper problem compile [on hold]

I read this article about how to make a torn paper effect. So I tried the code below, but some errors arise. \documentclass[a4paper,11pt,twoside]{book} \usepackage{lipsum} % To generate test text \...
1
vote
1answer
52 views

Tikz: Align text in nested nodes

The following code: \documentclass[tikz, border=1mm]{standalone} \usepackage{tikz} \usetikzlibrary{backgrounds, positioning, fit} \begin{document} \newcommand{\boxdist}{3cm} \newcommand{\textwdh}{...
3
votes
2answers
69 views

BlochSphere package : draw black axis

I need to draw the x,y,z axis of my bloch sphere in black (with an arrow at the end of them). I tried this code which doesn't work (my axis are light grey). How to fix it ? I am not sure to ...
0
votes
0answers
17 views

Enlarging area or scaling the plot

I have made my plotting setup using tikz. It displays some characteristics in dependence on the time. It works fine, all test passed. However, with longer time spans, I am running out from the valid ...
1
vote
1answer
21 views

Removing vertical grid lines from graph

I am trying to remove the highlighted vertical grid lines from my graph. How would I achieve this? The following is the code I have written: \documentclass[]{article} \usepackage[margin=0.5in]{...
0
votes
0answers
12 views

tikz/fit around node with label above // refer to node.label [duplicate]

I want tikz to draw an automatic fitting outer node around an inner node combined with its above-label, i. e. the size of the outer node should be computed by tikz basing on the inner-node-size and ...
2
votes
2answers
91 views

How to remove one of the sides and show the inside of a cuboid

I would like to remove the top side of the following cuboid, \documentclass[border=3mm,tikz]{standalone} \usepackage{tikz} \newif\ifcuboidshade \newif\ifcuboidemphedge \tikzset{ cuboid/.is family, ...
3
votes
1answer
44 views

Dual y-axis plot

Want to do a dual axis plot and I am stuck with some details - maybe someone can point me in the right direction? The main problem is that both bar plots overlap! \documentclass[border=5mm]{...
3
votes
1answer
40 views

PGFPlot vector field has uneven display

I have a simple 2D vector, however the points are aligned such that the vectors at the top pointing upwards are not include in the plot. I was wondering if there's a way to make the vector field more ...
5
votes
1answer
46 views

Restore TikZ settings after {pgfonlayer}

This is kind of a follow up question of Bug in TikZ? Line width on layers. When using a {pgfonlayer} two problem occure: a) inside of the background scope settings from e.g. every picture are missing....
1
vote
1answer
20 views

How modifying the width of xticks line in a barplot?

I have the following plot The code for obtaining it is \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage{tikz} \usepackage{pgfplots,pgfplotstable} \pgfplotsset{compat=1....
9
votes
2answers
344 views

Drawing Shapes on Graphs

I am trying to draw a regular pentagon on a graph (I need to add more stuff to it, so having the axis is desirable), but when I try to draw the two together they do not line up. Here is my code: \...
2
votes
1answer
42 views

Advanced Fraction with several Level

I would like to ask, how could I use LaTex to create following tools refer to the uploaded graph. Do you have some idea to mock such tool in following graph? Some descriptions: The Tool is for ...
2
votes
0answers
21 views

`imshow` like diplay of image with colormap

I would like to show an originally gray scale image with a specific colormap like matlabs/matplotlibs imshow. Original: % python import matplotlib.pyplot as plt import matplotlib.image as mpimg ...
2
votes
1answer
23 views

How to vertically center nodes' text for nodes positioned via above

I have 2 nodes of different height. They are positioned relative to the nodes below them, b1 and b2, which are the same height and have the same y value. I want b1, b2 to have the same horizontal ...
2
votes
1answer
44 views

How to align eso-pic & tikz coordinates

I have a grid on my beamer slides generated by: \usepackage[texcoord,grid,gridunit=mm,gridcolor=black!30,subgridcolor=gray!10]{eso-pic} I'd like to draw a rectangle in tikz with: \draw [textpos,...
1
vote
0answers
35 views

gantt package progress bar

I would like to know if it is possible to provide the progression for each taskbar by partially filling with a completion percentage. The picture below clarifies the idea that I had in mind. gantt ...
1
vote
1answer
32 views

Fit a circuit figure in beamer presentation

I am trying to fit this circuit in beamer presentation. \documentclass[aspectratio=169]{beamer} \usepackage{tikz} \usepackage{circuitikz} \begin{document} \begin{frame}{Lets unfold the box} \begin{...
4
votes
3answers
218 views

Naming intersection points of a grid

Is it possible to automatically give names to all intersection points of a grid, so that I can draw from a specific intersection to another. In my example, I manually gave names to the coordinates of ...
5
votes
2answers
148 views

Inaccurate Calculations By pgfplots

In graphing a certain function using pgfplots (link here) I noticed a distortion in the curve that at first I assumed must have been a point of inflexion - but on investigating the maths, found that ...
2
votes
1answer
73 views

How do I draw a labeled diagram like following

I believe there is help to draw the nodes and edges using Tex, but how do I draw the text on top of the edges?
0
votes
1answer
31 views

Table, Tikz picture in the left, text in the right: how to vertically align?

I would like a table with tikzpictures in the left column and explanatory notes in the right column. What can I do improve the vertical alignment of the row contents in the following example? ...
1
vote
1answer
13 views

Title, section headings disappears when I use \usepackage{forest} with IEEE Access template

When I include a \usepackage{forest} all colored text title, section headings disappears with IEEE Access journal template How can I tackle this problem?
0
votes
1answer
30 views

Tikzscale - Unscalable Picture

I would like to use the package tikzscale to scale my picture. I use the following code \usepackage{graphicx} \usepackage{ifthen} \usepackage{tikz-cd} \usepackage{tikz} \usepackage{tikzscale} \...