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

creating random numbers in a tikz diagram for use in a formula

I would like to create a worksheet similar to this https://pastebin.com/fSuS4C9f but for circumferences of circles not to bothered about the answers section at the moment but I can't even get the ...
user avatar
  • 405
0 votes
1 answer
19 views

Modify the style of UML-tikz elements with standard tikZ commands

I use the UML-tikZ package to create UML state machines. From time to time I want to make changes to the appearance of the given elements. For example, I want to enlarge the arrowhead of the element \...
user avatar
  • 93
0 votes
0 answers
15 views

Bar chart - values on y axis instead of percentages but keep percentages and values on every node

I would like to have the node of each bar being the actual value and its corresponding percentage but on y axis I would like to have scale of values. Here is what I have: \documentclass{article} \...
user avatar
3 votes
1 answer
52 views

tikz remember picture - How to set coordinate based on picture's height or width?

When using tikz to draw lines with the remember picture argument, is there a way to set the coordinates based on the height or width of the picture? For example, in the code below \draw [-stealth, ...
user avatar
  • 1,678
2 votes
1 answer
32 views

How to hyperlink the text in the vector diagram with the text in the article in LaTeX?

If we need to link the text in the article in LaTeX with the text in the figures, we can do this with the tikz package. However, tikz is a little difficult and it is very time-consuming, so a lot of ...
user avatar
  • 685
1 vote
1 answer
32 views

Part of tikz plot is missing

The last part of all my functions are missing. I have found a few similar posts here that suggested changing domain/samples. I tried a bunch of different values for samples up to 10000, but none of ...
user avatar
4 votes
1 answer
40 views

Generate TikZ Node with a macro

Inspired by this post, I tried to wrap this normal node... \node[fill=blue!20,shape=ellipse, draw=black] (nodename) at(0,0){\begin{tabular}{l} Main Text\\ \hline extension point: \\ Some ...
user avatar
  • 93
1 vote
2 answers
64 views

Drawing graph: using (x,y) coordinate rather than angle to determine the position of the vertices

In the following answer to draw a graph, is there a way to use (x,y) coordinate rather than angle to determine the position of the vertices to draw the same graph? https://tex.stackexchange.com/a/...
user avatar
3 votes
1 answer
38 views

adding line breaks in tikz and colour to diagram

I have the minimum about of code to produce what I want but am unsure how to split the text into separate lines, for example the examples below the definitions. Colour the ovals. \documentclass[...
user avatar
  • 405
1 vote
1 answer
29 views

Drawing a graph with vertices of different colors and different labels

I want to draw a graph exactly like the output of the following answer, but with vertices of different colors and different labels. https://tex.stackexchange.com/a/357243/148579 What parameters should ...
user avatar
0 votes
1 answer
30 views

Creating hatched cells in a resized table\tabular

I'm writing an elsevier els-cas article and am trying to hatch some table cells for a table\tabular setting. It seemed to work fine until I used \resizebox and set the table size to \textwidth. The ...
user avatar
  • 1
0 votes
2 answers
67 views

I want to create 10x10 squares and fill the elements all around with zeros?

I want to create 10x10 squares and fill the elements all around with zeros As shown in the attached images But when I add zeros, a space appears between these elements. Below is the MWE: \...
user avatar
  • 21
0 votes
0 answers
24 views

Two matlab2tikz figures side by side

I want to have two figures generated with matlab2tikz side by side. I tried \documentclass[12pt,a4paper]{report} \usepackage{parskip} \usepackage{blindtext} \usepackage[onehalfspacing]{setspace} \...
user avatar
0 votes
1 answer
28 views

How to group multiple figures into one and then draw lines over the entire figure?

I have a massive block of code with multiple figures in it. I am looking for an easy way to draw lines anywhere within the massive figure. This is the block of code that I have. \documentclass{article}...
user avatar
  • 1,678
1 vote
2 answers
41 views

Access pgfkeys outside environment

I find that the value of a key defined by \pgfkeys inside an environment can not be invoked outside this environment. In the following example, I want to typeset the value of the key aaa outside the ...
user avatar
  • 2,435
1 vote
1 answer
21 views

Setting a tikz node smaller than its label (within a matrix)

I'm using a tikz matrix to lay out a diagram. However, I've realised I want some of the rows to be even more closely spaced than they already are. Because of this, I want to set the height of one of ...
user avatar
  • 3,225
4 votes
1 answer
99 views

How to use tikz to draw lines over multiple figures? How to declare tikzpicture over multiple tikzpictures?

This code gives me the following figure. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{float} \usepackage{subfig} \usepackage{tikz} \title{test} \author{test}% \...
user avatar
  • 1,678
4 votes
3 answers
118 views

Setting tikz path options with a newcommand

Note: I've just realised an answer to this question might not help me - I'd forgotten about the issue in setting 'in' but not 'out' in tikz 'to' path , which kind of makes it ...
user avatar
  • 3,225
1 vote
1 answer
44 views

Beamer theme Metropolis changes TikZ draw

I am having trouble adding a TikZ graphic to my Beamer presentation which uses the theme Metropolis. Here is an example of the issue: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{...
user avatar
1 vote
1 answer
33 views

Forest: Using an ellipsis (...) and increasing horizontal space between nodes

Looking for how to insert an ellipsis (...) between $B_{1}$ and $B_{n}{1}$ and increase horizontal space between $B{n}{1}$ of U and $B{1}$ of R under K in the following picture. \documentclass{...
user avatar
  • 8,381
1 vote
2 answers
82 views

How to make a striped, colored circle in Tikz?

I want to make something like this How can I do it?
user avatar
  • 239
0 votes
0 answers
14 views

Trouble with clip and labels in pgfplot

I would like to add zero to the origin of the axes. I tried with clip = false and \node[anchor=east] (zero) at (axis cs:0,0) {0}; but with disastrous results. This is my graph: \documentclass[tikz]{...
user avatar
0 votes
0 answers
40 views

changing a tikz to a Venn diagram

I would like to change my following code into using Venndiagrams so I can colour the cells more easily and add examples eg 1,2,3 in the natural section. Or is there a better way? \documentclass[tikz,...
user avatar
  • 405
1 vote
1 answer
26 views

How do syntax and coordinate calculations work with the Tikz library `calc`?

I'd like to annotate an image in LaTeX using Tikz. I'm rather new to Tikz, so I have been following a tutorial which breaks it down quite nicely. In the tutorial they add an image to a node and then ...
user avatar
5 votes
1 answer
112 views

Syntax of \tikznode command?

I am trying to write a formal proof of validity that uses conditional proof (C.P.) arrows. I came across gernot's code for them at https://tex.stackexchange.com/a/581822/277990, and below I have ...
user avatar
2 votes
1 answer
40 views

Double nested nodes in tikz

I want to make something like the following image in tikz: To be able to do this, I would need to, essentially double nest nodes. I saw this post about nesting nodes: Nested TikZ nodes. The solution ...
user avatar
  • 23
2 votes
1 answer
28 views

Nodes anchors in foreach loop

I need to change the anchor of a node depending on the sign. For example, if the sign is "-", then the anchor is "north", otherwise "south". To do this, I implemented the ...
user avatar
  • 5,060
1 vote
1 answer
25 views

Adjusting the edge on this figure to fit into the margins?

Consider: \documentclass[12pt,a4paper,oneside]{book} \usepackage[nottoc]{tocbibind} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{bm} \usepackage{nccmath} \usepackage{amsfonts, ...
user avatar
  • 653
1 vote
0 answers
15 views

splot not plotting the graph correctly

This equation has to plot the point $(0,0)$ since when $x= 0, y=0$. But however I arrange the equation,it does not plot the point $(0,0)$. Can someone help me with this problem. \pdfpagewidth 85mm ...
user avatar
3 votes
2 answers
441 views

Why does the same code give two different outputs?

I accidentally copied and pasted the same code right below it. But the output is different. The second one has a strange omega attached to the triangle inside the set. Why is that? I copied it right ...
user avatar
0 votes
2 answers
22 views

Delete vertical and horizontal lines in both axis (tikzpicture)

I have the following figure: And I would like to be able to remove all the stripes or lines on the axes, which I enclose in black. This is my code, I would appreciate your help. \documentclass{...
user avatar
  • 196
-1 votes
2 answers
69 views

Can you help me use tikz to draw this figure?

I need to draw a figure but it is well beyond my skill set (I only used a little bit of tikz in the past and that was a long time ago). The figure I need is this one: I would love to provide a MWE ...
user avatar
  • 2,101
5 votes
3 answers
389 views

Is there a way to extract x or y value of the local max and min points?

\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (-1,0) -- (5,0); \draw (0,-1) -- (0,3); \draw[red, thick, samples=100] plot[domain=0.35:4.2] (\...
user avatar
  • 145
1 vote
1 answer
22 views

How can I easily annotate callself with pgf-umlsd?

I want to draw a sequence diagram with pgf-umlsd package. I would like to make some annotations regarding the points in time and durations of certain calls and messages. This works well for calls and ...
user avatar
  • 13
1 vote
2 answers
63 views

Nesting blochspheres in tikzpictures using the blochsphere package

I am using the blochsphere package (see 1) and I want to nest it in another tikzpicture, to work with several blochspheres. The manual tells one to put "nested=true" in the settings for \...
user avatar
  • 205
0 votes
1 answer
56 views

Coloring a world map

I'm trying to create a graphic with tikz on latex/overleaf of a world map based on regionally disaggregated data, so I want e.g. all countries that belong to Eastern Europe to have the same colour, ...
user avatar
-4 votes
1 answer
80 views

Draw this picture in Latex template. (Complex 1)

Draw this picture in Latex template. (Complex 1) Draw this picture in Latex template. With respect With respect
user avatar
0 votes
0 answers
106 views

How to draw equations (not funtions) in LaTeX

I want to draw this equation in LaTeX using tikz (maybe with pgfplots): (x^2+y^2) + \frac{0.7}{\sqrt((x-0.3)^2+y^2)} + \frac{0.3}{\sqrt((x+0.7)^2+y^2)} = 2.5 This is from geogebra: I tried gnuplot: \...
user avatar
1 vote
1 answer
43 views

Remove ticks from axes and draw arrows on arcs

Question: Once you compile my codes, you will find the output like above pic. My question is whatever I made change manually with red color, How can I achieve that? Second question how to remove ticks ...
user avatar
  • 2,521
1 vote
2 answers
98 views

Inline graph notation with labels and colors

I was writing about flag algebra and came across Notation for flag algebras in graph theory, which gives the code for creating a new command that creates inline graphs. However, I'm unsure how to ...
user avatar
1 vote
1 answer
29 views

TikZpictures as wide as columns in the figure environment inside of the multicol environment?

I have been writing a document that has a bunch of geometric figures in it. Each geometric figure is accompanied by some remarks. The remarks always immediately precede (i.e., appear above) the figure ...
user avatar
5 votes
3 answers
89 views

Changing inner sep of tikz matrix without affecting the nodes inside it

This is related to Baseline of tikz picture within brackets but is a separate issue. Consider the following MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} % for "matrix ...
user avatar
  • 3,225
3 votes
1 answer
37 views

Baseline of tikz picture within brackets

(Note: I've edited this question quite a bit because it turned out my original problem was caused by two separate issues, so I'm separating them into two questions. The other question is Changing ...
user avatar
  • 3,225
2 votes
0 answers
38 views

Reduce file size of imported graphics and their fonts

I am looking to reduce the file size of the final version of my thesis as much as possible without real hassle and any loss of quality. At the moment it is around 7 MB. I read much about it (...
user avatar
  • 21
0 votes
0 answers
40 views

Geospatial chart with pgfplots and tikz

Is there a way to do something like this: by using pgfplots and tikz ? Thank you V.
user avatar
  • 1
2 votes
1 answer
27 views

Problem aligning tikzpicture or caption (side by side) with subfloat and comma separator in xaxis

I am facing a problem with the alignment of the caption when positioning two tikzpicture with subfloat and a comma separated number format in the x axis. Can someone solve this? Here is the MWE: \...
user avatar
  • 21
0 votes
1 answer
35 views

How to align table with tikz picture side by side

I am trying to align a table of data along side a tikz picture made only of the axis and grid used to draw by hand the data. However, the grid in tikz picture is not aligned with the middle of the ...
user avatar
0 votes
0 answers
92 views

Help drawing images in LaTeX [closed]

I used this: but … \usepackage{tikz} \begin{center} \begin{tabular}{l l} \multicolumn{1}{c}{Etat macroscopique } & \multicolumn{1}{c}{Vérification,}\\ $E_2~=2\varepsilon:~~$ \...
user avatar
0 votes
0 answers
47 views

Specifying an Arc in Tikz

I'm trying to learn to use Tikz via the tutorial here. Section 2.4 (Curved Path Construction) says that we draw a curve as follows: The next thing Karl wants to do is to draw the circle. For this, ...
user avatar
  • 239
4 votes
3 answers
384 views

Universal set in Venn diagrams

I have not used the venndiagram package before. I have tried to read the manual, but could not find an answer to how to make the universal set box fit for any number of elements. Here is what I have ...
user avatar
  • 405

1
2 3 4 5
633