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
46 views

3D rotated coordinate system on the interaction point of a line and an arc in Tikz

I want to draw a 3D (rotational) Cartesian coordinate system as shown in the attached figure. As a new user of TikZ, I stuck on the following points: 1) How to plot two arcs with same center and ...
3
votes
3answers
156 views

Computation logic of Partway in TikZ

PGF Manual pg. 66 describes about Partway Calculations. In this example, ($ (A)!.5!(B) $), .5 refers to 50% right? A point that is 50% away from point A. In that case, why do we require point B in ...
1
vote
2answers
69 views

Color each edge separately in TikZ

I want to color the edge AB with thick blue color and edges AC and BC with thick red color. Referring to the answer in Multiple color edges in TikZ, one way is to use the \clip[draw] command. But, I ...
5
votes
1answer
37 views

Arrow and label positing in a .pic using tikz

I am trying to draw a figure, which repeatedly contains a similar type of pictures. Hence I am using .pic provided by tikz in the following way: \documentclass[tikz, border=2px]{standalone} \...
3
votes
1answer
81 views

Drawing Torus with semi-dashed line on it [duplicate]

I would like to draw : To draw the above torus, I have used the following codes : \documentclass[margin=2mm,tikz]{standalone} \usepackage{pgfplots} \begin{document} %Oberflächenproblem \begin{...
1
vote
4answers
423 views

Draw this image in the TIKZ package [closed]

I need to draw this image using TikZ.
1
vote
1answer
41 views

How to define chamfered rectangle as .pic in tikz?

I am trying to generate a diagram which repeatedly contains the same graphics. See below a sample graphics: This is how I am generating it: \documentclass[tikz, border=2px]{standalone} \...
2
votes
2answers
137 views

Carnot and Otto cycle diagrams in Latex using Tikz or PStricks

How can I generate P-V or T-S plots for Carnot and Otto cycles? In addition to what are shown in the pictures, I would like to put directional arrows for steps starting from 1 to 4. Also, I was ...
6
votes
1answer
272 views

TikZ rotated text looks washed

I got that issue that a rotated text looks washed when you use the package: \usepackage[T1]{fontenc} Sadly I can't reject the fontenc-package because it has a lot of dependencies to the rest of the ...
3
votes
2answers
53 views

How to make circles with arrows?

\documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.text,calc,arrows.meta} \begin{document} \begin{tikzpicture} \coordinate (O) at (0,0); \draw (O) circle (2.5); \draw (O) circle (1....
0
votes
1answer
17 views

Reset vertex name counter in tkz-berge

I have a following graph constructed with tkz-berge library. In the current settings the nodes/vertices are numbered automatically started with index 0. I wonder how to reset the counter in order to ...
4
votes
1answer
68 views

How to draw multiple fillable PDF forms inside a rectangle using `tikzpicture` environment

I would like to draw two differents pictures. One of them consists of two rectangles, one with text and the other (below the first) with fillable text, as shown below: Here is text of this length is ...
1
vote
1answer
27 views

pgfplots - remove xz and yz background planes

I'm trying to get a 3dplot with only xy plane, without z axis and zx and zy planes. To be clear, this is the best result i've got: and this is what i'd like to obtain: Here's the code: \begin{...
1
vote
1answer
56 views

how to fill the area under a curve

I can not find a way to fill the area under these 3 curves and the legend doesn't seem to show the correct line colours (the red one is missing?). Thanks. \documentclass{article} \usepackage{amsmath} ...
0
votes
0answers
40 views

How to put a graph in front of another graph in Tikz

\begin{tikzpicture} \begin{axis}[ymax=17,ymin=-1] \addplot [color=red, domain=-4:4, samples=50]{x^2}; \node[label={180:{(1,5)}},circle,fill,inner sep=1.5pt] at (axis cs:1,5) {}; \...
2
votes
3answers
234 views

Drawing the Möbius band and the Klein bottle

I have this: \begin{tikzpicture} \begin{axis}[hide axis, unit vector ratio=1 1 1, view={-30}{45}] \addplot3 [surf, domain=0:360, y domain=-1:1] ( {(10+y*cos(3*x/2)))*cos(x)}, {(10+y*cos(3*x/2)))*...
3
votes
1answer
84 views

Phase plane diagrams in latex [closed]

Is there any method to construct phase plane diagrams directly in latex? I want to sketch plots like these based on eigenvalues of a matrix. For e.g., if both the eigenvalues of a 2-by-2 matrix are ...
3
votes
1answer
71 views

Pentagon of pentagons

I want to create a macro in TikZ that allows me to draw a pentagon of pentagons where every node, arrow and triangle is labelled (the common/repeated parts will have the same labels). Here is nice ...
5
votes
3answers
281 views

What is the meaning of option 'by' in TikZ Intersections

Pg 65 of the PGF Manual, shows different operations with the intersections library in TikZ. But I am not able to understand the code. What is the meaning of the option by here. The explanation given ...
3
votes
1answer
39 views

Color lists not working in foreach loop

I'm trying to plot the beta prime distribution, which is defined for x>0 with the two parameters α and β, having the probability density function: I'm trying to plot a graph like this: see https:/...
4
votes
2answers
59 views

Even-length cycle laid out as a star

For demonstration purposes, I want to obtain a graph of C10 shaped as a star. I have been working on this for much longer than I should have. I currently have this: \begin{figure} \centering \...
2
votes
1answer
61 views

Tikz: locally overwrite style

I want to locally overwrite a global style. For the MWE: In the second picture "t=2" should be right of node c respectively d. MWE: \documentclass[tikz]{standalone} \tikzset{% one/.style args = {#...
3
votes
1answer
28 views

Fade in box highlight in beamer

I want a fade in (with either timer or keystroke) highlight for a text. Here is the MWE that I was able to do. \documentclass{beamer} \usepackage[english]{babel} \usepackage{tikz} \newcommand*\myhl[...
3
votes
2answers
30 views

Tikzpicture shifts subfigure environment

I would like an axis drawn with TikZ in the corner of the image grid to see the increase in variables clearly. The MWE below results in Figure 1. I have tried putting a \linebreak in between \end{...
10
votes
3answers
225 views

How to draw tikz paths composed only of horizontal, vertical and diagonal segments?

Inspired by a recent question on stackoverflow about how to draw maps of transportation networks, I'm wondering how to draw paths that consists of vertical, horizontal and diagonal segments. Just ...
3
votes
1answer
44 views

Failed to properly set size of tikzpicture in beamerposter

I tried to insert a TikZ picture provided below into a beamerposter document. It is generated by the following code (except the arrow in the middle of the "incident beam", it's an excessive detail): ...
5
votes
3answers
82 views

Aligning nodes horizontally at the top and vertically at the left in TikZ

I currently have a weird mix of tree and alone nodes (so the path between nodes is customized) I want the nodes to be horizontally aligned at the top and vertically aligned at the left in TikZ. Here'...
5
votes
1answer
46 views

How to get curved arrow originating and ending at the same node

Hi I'm trying to replicate the graph below. I've done most of it, but can't figure out a way to have an arrow originate and end at I've managed to get the below figure. And I'm stuck at produce the ...
2
votes
1answer
47 views

TikZ 3D plot : how to add spaces between tick labels to prevent them from colliding?

I have a 3D plot with colliding yticklabels, which I have been unable to fix for now. Here is my minimum working example: \documentclass[10pt]{standalone} % \usepackage[utf8]{inputenc} \usepackage{...
1
vote
0answers
24 views

Plotting a Histogram (pgfplots) from a CSV file with Single Values [duplicate]

I'm trying to create a histogram from a CSV file of single values like this: 2, 3, 2, 5, 2, etc... I also have a copy of this file in a similar layout that has just single numbers next to their ...
5
votes
1answer
48 views

What does 'text badly centered' mean, and what is its modern PGF/TikZ equivalent

I have inherited an old LaTeX document that uses old \tikzstyle way of defining styles. Among other definitions there is one that reads \tikzstyle{decision} = [diamond, draw, fill=blue!20, text ...
0
votes
0answers
43 views

Ends of plot get cut off

About 1/10 of one of my plots gets cut off on both sides, no matter how xmin and xmax are set. How can this be prevented? \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} ...
1
vote
1answer
36 views

Direction of axis ticks in tikzpicture

When plotting a bar chart using the following example, the ticks of the y axis are directed to the inside, the ones of the x axis to the outside. How can I make it so they both show on the inside and ...
0
votes
1answer
50 views

How to add tables in flowchart.?

I need to draw the flow chart as shown in the figure below. Can I add the tables in the LaTeX blow chart as nodes? My code: \tikzstyle{c-rectangle2} = [rectangle, ultra thick, rounded corners, ...
4
votes
3answers
98 views

Macro returning a length depending on current chapter

I am writing a document using scrbook and I have defined a custom chapter style where I draw a large chapter number using tikz: \renewcommand*{\chapterformat}{% \begin{tikzpicture}[remember picture, ...
1
vote
2answers
70 views

Coloured hexagon with dots on edges

I found this answer by cfr but when I use the code it gives me error. Also I need dots but I couldn't do it. All I could do was to draw a hexagon with vertices labeled. How do we colour the edges and ...
1
vote
1answer
28 views

Remove scientific notation in a tikzpicture axis xbar graph

How can I remove the scientific notation of each bar's value? \begin{tikzpicture} \begin{axis}[ xbar, bar width = .3cm, y axis line style = { opacity = 0 }, ytick ...
2
votes
1answer
31 views

how to put the box under another box

why the line of 2008 above the box of 2007? I did not change any code. I want to change the line of 2008 below of the box of 2007. Chronosys printing measurement units \documentclass[border=10pt,...
3
votes
2answers
44 views

Named paths inside a tikz/pic

I am trying to understand the naming behavior of paths inside a pic definition. Consider the following \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \tikzset{% ...
6
votes
2answers
129 views

Arrow between lines in the align environment

I want to add some texts between lines in the align* environment like this: I tried the following code: \documentclass{article} \usepackage{tikz,amsmath} \usetikzlibrary{tikzmark} \begin{document} \...
0
votes
0answers
32 views

What packages are capable to draw these figures? [duplicate]

Hey everyone! It would be nice if I could draw any of these pictures myself that's I want you to point out to me the packages to draw. So that I can learn it and built it to my needs.
5
votes
1answer
71 views

Tikz, issue with applying style to nodes

I am a beginner in LaTeX, especially in TikZ package. I want to draw Peterson graph with some styles. My code \documentclass{article} \usepackage{tikz} \usepackage{caption} \usepackage{graphicx} \...
2
votes
1answer
35 views

Generating TikZ Nodes and Labels from Custom Array Strings

I am trying to use the TikZ environment to annotate a graphic with labels in multiple specific locations. Instead of repeating the node command many times and changing the node location and label, I ...
1
vote
1answer
71 views

Adding a plus symbol in tikz environment

I am in the midst of making a flow chart. Currently, I have: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric,arrows,amsmath} \tikzstyle{...
3
votes
1answer
65 views

How can I force two rotated matrices to have the same size irrespective of content?

I have two matrices which are rotated 45 degrees next to each other. Unfortunately, they are different sizes, likely because one has two-digit numbers, the other one digit. How can I force them to ...
1
vote
1answer
26 views

Petri-Net: Displace a node by x units after using relative positioning in TikZ

After using relative positioning in TikZ, I wish to displace the note by x units on the right to achieve this. I found this answer Move a tikz node somewhat below in relative positioning helpful. But ...
5
votes
1answer
74 views

Border lines not meeting in one corner

I am trying to create a table with horizontal and vertical lines, but the lines are not meeting in the upper right hand corner. Can anyone figure out where I'm going wrong? \documentclass{article} \...
2
votes
1answer
97 views

Externalizing TikZ-Images takes very long

Introduction Hello, I am facing very long compile times of more than 14 minutes for a ~130 page document, including around 40 PGF-Plots/TikZ-Images. Due to LaTeX's memory limits and (in fact) for ...
2
votes
2answers
53 views

Wiring up text parts

I'm currently trying to wireup text parts to describe some thing like Unix file permissions or the output of an ls -al But I have no clue how I can create something like this: I was thinking about ...
8
votes
1answer
203 views

Text in TikZ with perspective (not just slant)

I want to display text in TikZ that is perspectively distorted, like so: (checkered pattern added for illustration only) There are many similar solutions on TeX.SE (here, here, or here), but all of ...