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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

How to use \begin{array} environment with tikz?

I want to insert several math equations in array form in a tikz node in beamer. However, I got the following error: Missing $ inserted The source code is: \begin{center} \begin{tikzpicture} \node[...
0 votes
0 answers
17 views

How to draw Venn diagrams (especially: colored the intersection) using \node in Latex with tikz

There are plenty of examples show how to draw Venn diagrams using \clip command, such as https://texample.net/tikz/examples/set-operations-illustrated-with-venn-diagrams/ However, all those examples ...
1 vote
0 answers
19 views

Point-perfect outline and font size in standalone tikzpicture

I try to create a PDF which is 156 pt x 85 pt large, with text at sizes 9 pt and 11 pt, using the following .tex file: %!TEX TS-program = xelatex \documentclass[border=0pt]{standalone} \usepackage[...
1 vote
1 answer
26 views

Positioning the TikZ node slightly below the linage

In the output of the code below, the node is positioned on top the linage. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \setlength\parindent{0pt} \setlength{\parskip}{6pt ...
4 votes
2 answers
75 views

Defining line style for drawing feedback loops in tikzdiagrams

I would like to be able to draw inside a tikzdiagram a line that represents a feedback loop like the following with a command like (but not necessarily exactly like) \draw[feedback](0,0)to(-1,-1); I ...
  • 97
-3 votes
0 answers
33 views

draw diagram in latex [duplicate]

Hello everyone, I am a beginner in latex. someone can draw me this diagram with writing in each box Sincerely
  • 1
2 votes
3 answers
149 views

Repetitive perpendiculars in a right angle triangle

I am trying to draw perpendicular from O in right angled triangle (OAB) to the hypotenuse. From the foot of perpendicular (say X0) of it, two perpendiculars are drawn to rectangular axis with foot of ...
  • 121
4 votes
1 answer
105 views

How to make tikz help lines have the (0,0) start exactly at lower left corner of the body of the page?

Is there a way to automatically make help lines that spans the whole body of the page where (0,0) at south west corner of the page? Here is a MWE. I did this by trial and error and found that (0,0) ...
  • 18.8k
3 votes
2 answers
67 views

pgfplots: tick-labels at the end of the ticks

I have a y-axis. What do I have to set, to get the tick-labels at the end of the ticks? BTW: I would like to have a 'zero' axis what do I have to set for this? It seems I will need: axis lines*=...
  • 6,441
1 vote
0 answers
26 views

How to modify single elements of PGFPlotsTable?

I want to create a table with some values. Afterwards I want to replace one element of the table and display a plot. The nearest I get, you can see below in the minimum example. So there are two basic ...
  • 11
2 votes
1 answer
46 views

Parameter \newcommand tikz

I need to do a series of gear-trains and I have done used \newcommand to parametrize the gears. I am sure that it is possible to do this in a more efficient manner and would be helpful of anyone could ...
0 votes
0 answers
33 views

Multiple planes in 3d space

I'm trying to code a number of planes in 3 dimensions. I'll leave an image of what I have in mind (the x-y plane is not necessary): I have seen elsewhere that it may be possible to do with tikz. I ...
2 votes
2 answers
187 views

How to solve "Package tikz Error: Giving up on this path. Did you forget a semicolon?."?

The code that gives this error message is \documentclass[dvipsnames]{standalone} \usepackage{pgfplots} \usepackage{tikz-3dplot} \usepackage{tikz} \usetikzlibrary{decorations.markings} \pgfplotsset{...
2 votes
2 answers
70 views

String conditional tikz

I am trying to make a print command for a board game (Amazons). I specify the dimensions and board state, so \AmazonsBoard{3}{3}{WXX---BXX} will draw a small 3x3 board. There are 4 different square ...
  • 23
3 votes
1 answer
108 views

Create style that displays the area under the curve with pgfplots

I currently have this code: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \definecolor{linecolor1}{HTML}{3DC6F3} \pgfplotsset{integration/.style={color=linecolor1,mark=none,line ...
0 votes
1 answer
45 views

Vertical Bars at the end of arrows

I am trying to recreate the picture attached. For some reason, I can't use the Triangle-Triangle code between two vertical bars using the draw command. I have tried different combinations, but with ...
  • 534
1 vote
1 answer
34 views

Is there a way to deal with numbers larger than \maxdimen?

i want to plot a polynomial approximation with tikz. Unfortunately when i use a polynomial approximation with order 5 tikz fails to calculate the result. This is an example: \draw[domain=1:10] plot (\...
  • 77
0 votes
0 answers
30 views

Plot two vectors of data in tikz without using pgfplots (and preferably using cmd)

I have two vectors of data that are something like \x {55, 56, 57} \y {2.065561, 2.3263547, 4.028649} I want to plot them as a line plot something like: \draw( \x*/2,-\y)node[circle,draw,solid,scale=0....
2 votes
1 answer
41 views

pgfplots: place second y-axis at fixed x-position

I have a second y-axis, that is a '(purple) q-axis'. What do I have to set to place the second y-axis through (1,0) at the original coordinate system (black). \documentclass[margin=5pt, tikz]{...
  • 6,441
0 votes
0 answers
25 views

How do I create a straight line with evenly space points indicating a sequence of clopen sets $[a_i, b_i)$?

How do I create a straight-line figure with evenly spaced points indicating a sequence of clopen sets $[a_i, b_i)$ in LaTeX?
0 votes
0 answers
34 views

Drawing a mass-sping-dashpot system

I want to create the following figure I use the following code taken by https://tikz.net/mechanical-systems/ \documentclass[border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc,patterns,...
  • 1,083
1 vote
0 answers
58 views

Drawing non-ordinary binary trees

An author sent me the sketches for his article devoted to the description of knowledge structures in memory which are described by binary trees divided into subdomains. The author uses free-form lines ...
0 votes
0 answers
30 views

Draw growth rate of a variable in TikZ [closed]

I wish to replicate this figure. I didn't find nothing similar online. There is anyone that can hekp me to set the code? Thanks
0 votes
0 answers
15 views

How to avoid normalization of real numbesr up until its first decimal point in addplot LaTeX? [duplicate]

This is my first question here, I count on your warm welcome. \begin{tikzpicture} \pgfplotsset{width=14cm} \begin{axis}[name=plot] \addplot[red] table {mutation_var.txt}; \end{axis} \...
2 votes
1 answer
33 views

no math is generated when using tikz/forest with tex4ht in mathjax mode

This MWE \documentclass{article} \ifdefined\HCode \def\pgfsysdriver{pgfsys-dvisvgm4ht.def} \fi \usepackage{amsmath} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree={ draw, ...
  • 18.8k
-1 votes
2 answers
57 views

Avoid "jumps" in text between slides [Tikz]

I created a diagram in beamer, but right now the text "jumps" when I flip the slide (When adding the "Primary outcomes in survey" bullet point). I'd like the text to stay stable. ...
  • 141
2 votes
2 answers
73 views

Show integer coordinates on axis

If I plot the following graph I obtain a point 1020 on the x-axis instead of 1024 as intended. Is there a way to fix this? \documentclass[10pt]{article} \usepackage{pgfplots} \begin{document} \...
0 votes
0 answers
26 views

To fix error ; make fit for big 40 data ,Add x asis value at buttom ,Reduce bar width and space between bar and label

I want to fit big data inside it but it get blur when data increases .Blur appear downward . Also guide me how to reduce the width of the bar .i have more than 50 data .Fit in a way such that 50 item ...
0 votes
1 answer
33 views

how to have more control on the anchor location of a node other than defaults?

A tikz node has anchor points south, north etc.. also south west and south east etc... But in this diagram below, I'd like to draw a line from a node starting not at exactly south west but half way ...
  • 18.8k
2 votes
2 answers
65 views

\hrulefill behavior with a tikz draw command

I would like the dotted line drawn with Tikz below to \hfill like the \hrulefill line does. Any ideas without using any external packages? \documentclass{article} \usepackage{tikz} \...
1 vote
2 answers
52 views

How to write a text in a square drawn with tikz?

I've used tikz to draw a digram like this: $$\begin{tikzpicture} \draw (0,0) -- (0.6,0) -- (0.6,0.6) -- (0,0.6) -- (0,0); \draw (0.6,0) -- (1.2,0) -- (1.2,0.6) -- (0.6,0.6) -- (0.6,0); \draw (1.2,0) --...
2 votes
1 answer
78 views

Connected item list with TikZ

I'm trying to draw a list of items, not unline itemize, where the dots are all connected by a vertical line. In other words, what I'm aiming for is a kind of vertical timeline, but without dates. In ...
  • 2,530
0 votes
0 answers
37 views

improve a graph

I have the following code for a figure. I'm not satisfied with the result, in particular "the bullet". How improve this figure ? Thanks \def\xmin{-5}\def\xmax{5} \def\ymin{-1.5}\def\ymax{...
  • 353
0 votes
0 answers
24 views

Trying to put curly brackets on column heads in LatEX [duplicate]

I am trying to put curly brackets to illustrate sections of my columns, does anyone know how I can do it? I have attached the picture for reference. specifically how I am able to label each brace ...
1 vote
1 answer
16 views

Place beamer frame title into parallelogram at top left corner

I am trying to place the title of each frame in a parallelogram that adjusts to the length of the title. I want the parallelogram to start at the same position of each frame, for example, at the top ...
  • 13
1 vote
1 answer
35 views

Adding nested backgrounds to a tikzpicture

I am trying to recreate the following diagram with TikZ. Here is what I have \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[roundnode/....
  • 141
1 vote
2 answers
93 views

label on top of bar . How to draw like this?

Please help to write code for this .
user avatar
0 votes
0 answers
31 views

How to set intercept of linear regression line in pgfplots? [duplicate]

In excel, one can set the intercept of the trendline that goes through a scatterplot. Is it possible to do the same thing in pgfplots, for example making the linear regression line go through the ...
  • 1
0 votes
1 answer
34 views

x-axis not aligned in adjacent plots

I am trying to align the x-axis of these two plots unsuccessfully. Makes me wonder what's wrong? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz, pgfplots} \pgfplotsset{...
0 votes
1 answer
105 views

Help for figure

I use to apply tikz to create mathematics figures. I wish to make this, but I did not come long. Could you please help me to make this. It is not need to be exactly same, but x-h, x , x+h on x-axis ...
  • 101
0 votes
0 answers
39 views

Solution Curve Plot with TikZ [duplicate]

I have this Dynamical System learning, and I want to know how to plot this curve using Tikz. I tried Julia, but then think maybe Tikz can accomplish this better. Thanks before!
1 vote
1 answer
56 views

Mapping categorical values to styles when reading data

I'd like to use tikz to generate an updated version of figures 10 and 11, from the superb book "Sustainable Energy -- without the hot air" by the late David JC MacKay. These plots represent ...
  • 11
2 votes
1 answer
69 views

How to rotate a polar plot without rotating the grid lines

Please, how do I rotate the following polar plot without rotating its grid lines and polar axis lines? To make it clearer, I just want to rotate the petals alone without rotating any axis or grid ...
0 votes
0 answers
42 views

Drawing a mass-spring-dashpot system

With circuitikz package I can create circuits like the RLC circuit on the left in the figure above. Is there a similar library for mechanical oscillations systems as the mass-spring-dashpot system on ...
  • 1,083
1 vote
1 answer
30 views

Modify the size of a text in a tikz picture with a triangle

Searching several posts in tex.stackechange I have created the figure below using the following code \documentclass[12pt, border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{angles, ...
  • 1,083
0 votes
1 answer
46 views

Coloring a tikz cycle with a different color for each segment

I have the following code: \documentclass[letterpaper]{article} \usepackage[table]{xcolor} \definecolor{asparagus}{rgb}{0.53, 0.66, 0.42} \definecolor{bleudefrance}{rgb}{0.19, 0.55, 0.91} \...
  • 437
0 votes
0 answers
29 views

Tikz: Tikzpicture with two matrices not aligned at top [closed]

As you can see in this picture, both columns are centered vertically. However, I want them both to be aligned at the top (marked as a blue line). My workaround was to add dummy lines to the right ...
  • 101
-1 votes
0 answers
50 views

Which software tool was used to produce these TikZ graphics? [closed]

I am currently reading a PhD thesis, and there are some extremely good 3D diagrams that were apparently produced using TikZ. Have a look at these: Also here is a good 2D plot: I'd love to know what ...
  • 1
0 votes
0 answers
34 views

Empty Calendar in LaTex

This source: https://texample.net/tikz/examples/birthday-calendar/ is for calendar, but some dates like 2023-01 (january) are empty. can you help me?
  • 1
0 votes
2 answers
43 views

Tikz trees: How to add label to dashed information set

I searched online and in stack overflow for how to add a label to a straight dashed information set but was not successful. I see suggestions to add a label to a curved dashed information set but ...

1
2 3 4 5
645