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
0answers
4 views

how to remove this incompatibility between tikz, bodegraph and tcblisting

Hello I want to plot some code examples of using the Bodegraph package with tcblisting. The code below works fine if I put the semilog {} ... command in a scope environment, on the other hand if I put ...
0
votes
2answers
55 views

Drawing lines on cartesian coordinate

How do I express this into LaTeX code? I'm new, and I have no idea how to this (I think it requires pgfplots/tikz). Thanks!
2
votes
1answer
40 views

Span Tikz y y graph across two columns

I want to add more datapoints to my X axis, however it seems like the graph is fixed. Is there a way to make it span across two columns? \documentclass{article} \usepackage{pgfplots} \begin{document} ...
5
votes
0answers
54 views

TikZ callouts: How to prevent sharp pointer tip from being rounded?

When drawing a corner-rounded callout box, the pointer tip is rounded as well. Here is an MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.callouts} \begin{document} \begin{...
2
votes
1answer
40 views

TikZ: coloring multiple passes over the same path between nodes

I'm drawing a lattice of nodes and I would like to highlight certain paths with different colors. When the paths overlap, I would like the colors to appear adjacent to each other. I've seen ...
1
vote
0answers
30 views

How to put a minipage at a point on the sheet?

I need to position each textbox like the following image code \documentclass[10pt,twoside]{article} \usepackage[spanish,es-lcroman, es-tabla, es-noshorthands]{babel} \usepackage[paperwidth=8.8cm, ...
0
votes
0answers
19 views

Timeline with horizontal bar and dateplot

I am trying to draw a timeline using pgfplots and dateplot: This is inspired from How to create a multiline timeline but I would like to use real dates in this case. Here is my example: \documentclass{...
1
vote
1answer
52 views

How to tag a word?

I need to categorize typos in text and tag words as per the image. For example, instead of "LIB" would be "TYP" (to indicate a typo), and instead of "skins" would be the ...
0
votes
2answers
57 views

Drawing Directed Graph (Diagram for State Transition Matrix)

Just getting started with TikZ, and the first graph that came to mind was this one on my homework: Can someone help me set up a general example graph and some ideas on how to: Label the elements in ...
5
votes
3answers
937 views

plot $(e^x-x)^{\frac1{x^2}}$

I need to plot the function (e^x-x)^(1/(x)^2) in tikzpicture, but close to 0, apparently latex indeterminates it, does not graph it. This is the code I am using: \documentclass[1cm]{standalone} \...
6
votes
1answer
100 views

Gaussian on an oblique ray with Tikz

I try to draw a generic Gaussian over a ray, to indicate a possible generic trend. At the moment I have managed to draw both the ray and the Gaussian, but I can't get it to lay on the ray, as changing ...
0
votes
0answers
33 views

How to increase the vertical distance between proof lines in a prooftrees environment?

With the following code I tried to create a proof tree with the prooftrees environment wich is based on the forest package which is based on the pgf/TikZ package: \usepackage{pstricks} %\usepackage{ot-...
5
votes
1answer
811 views

Draw an electrical machine

I want to draw the following figure on Tikz: I have tried with this code, but the lines are distorced: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \begin{...
1
vote
0answers
28 views

Boolean && problem with PGFPlots \addlegendentry

While answering this question: Having problems with drawing a modulus graph in LaTeX (overleaf) I encountered a strange problem/bug. && in a filter does not work with \addlegendentry \...
3
votes
0answers
50 views

Compute intersection between a node's boundary and a path (Or, how to generalize pgfpointshapeborder)

I'd like to compute the intersection between a node and a path, here I'd like the coordinate of the intersection in the green box: My goal is to define a style that draws lines similar to \draw[...
2
votes
0answers
46 views

How to make LaTeX package globally available and easy modifiable?

I am drawing math images using TikZ and have recently realised that I want to build my own package/s (in the form of a .sty-file) which can be used for all new documents. In this I for example want to ...
0
votes
1answer
42 views

Using newcommand and gnuplot to plot sums of parametric functions

I want to add (or subtract) a bunch of parametric plots together, something like this: \documentclass{report} \usepackage{tikz} \newcommand{\myPlota}[1]{ (#1>0?(t<#1?0:1):(t<-#1?-1:0)) } \...
0
votes
1answer
45 views

Editing 2D Drawing using Tikz in Latex

I'm trying to edit a 2D figure using Tikz. My current code and plot are as follow: \usepackage{tikz} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amssymb} \usepackage{...
0
votes
1answer
41 views

On the Tikz Shape var resistor IEC

In the Tikz manual there is an example to generate the figure below: I tried to see if the code works after applying @Zarco comment to add definition for shape example style: \documentclass[border=0....
0
votes
1answer
20 views

How do I get this node correctly vertically and horizontally aligned, no deviation horizontally from node above?

I am trying to get the node \node[below = 3 cm of OPC] (NCM) {No match}; aligned so it is directly below the node above, and exactly on the same line as the node to the right. If I do a simple below ...
1
vote
1answer
56 views

How to change a node point from a circle to a cross?

I may be going about this the wrong way, but I'm trying to highlight a specific point on a graph using tikz and pgfplots. Currently I'm using a node to draw a circle round the point - however, I would ...
0
votes
0answers
21 views

Limit scope of node properties to current node only in tikz

I'm defining a command to draw a red box with nice rounded corners around text or graphics elements in LaTeX with tikz: \documentclass{article} \usepackage{tikz} \begin{document} % command to draw ...
0
votes
1answer
52 views

Drawing ER diagram with TikZ/Graphviz/dot2texi

I want to draw an ER diagram using these combinations of packages. I have tried to follow and re-create this guide, figure 6. The graph has to be drawn in an overleaf document, which leaves me with ...
1
vote
1answer
41 views

Proper use of TikZ fading to cut text from a box with rounded corners

Following up from this post, I am trying to build an illustration to look like this: It's important that the transparent text is indeed transparent, not white. When I compile the following MWE \...
5
votes
2answers
286 views

Can't draw a trig function

Is there something wrong? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.50] \draw[thick, ->] (-10,0) -- (10,0)node[pos=1,below]{$x$}; \draw[thick, ...
4
votes
2answers
228 views

How to Draw Hieroglyphics Similar to These with Latex

In Burton's History of Mathematics, the following hieroglyphic drawings are introduced: For something I plan on writing on Egyptian arithmetic, I would like to make use of hieroglyphics that resemble ...
3
votes
1answer
86 views

Fit text in a circular shape

I'm trying to fit a text within the arrows but in a circular shape, however, the text doesn't bend nicely. \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \begin{...
1
vote
1answer
48 views

Bad SVG when two TikZ pictures are placed side by side in a figure environment - make4ht

When I use make4ht index.tex "xhtml" to compile the file \documentclass{report} \ifdefined\HCode \def\pgfsysdriver{pgfsys-dvisvgm4ht.def} \fi \usepackage{tikz} \begin{document} \...
0
votes
2answers
78 views

Placing a Colored Text Box within a Sentence

Consider the code \documentclass{book} \usepackage{xcolor} \usepackage{tcolorbox} \usepackage[tikz]{bclogo} \usetikzlibrary{calc,shapes.callouts,shapes.arrows} \newtcbox{\logo}{nobeforeafter, notitle,...
1
vote
1answer
36 views

tikzpicture infinite width and scale to \textwidth

I would like to tell tikz to make an image as wide as it needs so it is drawn correctly and then to scale it to \textwidth eg \documentclass{article} \usepackage{amsmath} \usepackage[usenames]{color} \...
0
votes
1answer
37 views

Problem with TikZ externalize and \pause

I try to use \pause for TikZ pictures. Normally this works great, but since I have many pictures in my document, I also want to externalize the TikZ images. So, if I add the \tikzexternalize command, ...
1
vote
1answer
44 views

Get one value from a pgf/tikz style

Considering \pgfkeys{ A/.style={ key=value, key2=value2, } } how do I retrieve "value" from "A" and "key"? After some experiments, next seems to work for at ...
2
votes
2answers
27 views

How do I get the y axis on a pgfplot to show the values I want, rather than 0 to 1 [duplicate]

I'm trying to draw a pretty simple graph using pgfplot and tikz, but I'm having a bit of trouble with the y axis. My code is as follows \begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = {...
1
vote
1answer
30 views

Draw edge from edge between parent and child node to new node using TikZ

I am trying to draw an edge which starts from the edge between nodes A and B in the picture below to a new node J as shown below. I am able to draw an edge from the edge between B and C to a new node ...
2
votes
2answers
41 views

How to change \slice{} color on quantikz

Within quantikz package there's this possibility to put a single slice to separate two columns, through the command \slice{}. By default it is colored in red and no standard command allows to change ...
1
vote
1answer
62 views

Tikz: check if a node has an anchor, and check the shape of the node

How could I check in tikz (during a path creation) if a node has a given anchor (say west)? Notably, I may want to draw different path depending on the type of node that I get, like \tikztostart.west ...
1
vote
2answers
56 views

Tikz: `\tikztostart`, how to differentiate nodes from coordinates, and obtain coordinate at angle X of node's border

I'm curious to know, how can I choose the starting point of a path? I'm trying to produce this kind of pictures when my user draws a path from A to B: However, if I use (\tikztostart.west) to specify ...
6
votes
3answers
387 views

Tricolored Rectangle Using Tikz

I am trying to create a tricolored rectangle in which I can specify the point where the color changes (i.e. not necessarily equally spaced like the French flag). I have included a MWE below that ...
5
votes
1answer
165 views

How do I get the last rounding in the last corner?

Everything is in the title How to get the last rounding in the last corner in the code below? \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[fill,blue!50,...
3
votes
1answer
104 views

How to clip text from a drawn rectangle in Tikz?

Rather than defining a specific color for some text in a drawn box, I want the text to be clipped from the box so that the paper color is visible. Here's the MWE: \documentclass{article} \pagestyle{...
0
votes
0answers
75 views

Drawing Intervals and subintervals in LaTex [closed]

I would like to draw the following picture in LaTex, with the subintervals A1, A2, A3, and (if possible) An. Could you help me coding this? Thanks already in advance!
1
vote
1answer
43 views

Success Run Markov Chain diagram

I'm trying to draw a Markov chain transition diagram showing a success run like such: However, my own attempt looks rather ugly compared the the picture above: \documentclass[border=10pt]{standalone} ...
2
votes
0answers
40 views

"node on layer" style in tikz matrix (tikzcd)

I've been trying this answer https://tex.stackexchange.com/a/20426/116348 to put a node on a layer using only its style, like in \node[node on layer=front]{A};. It works great... except in tikz ...
0
votes
0answers
43 views

How can I have a second figure in one chapter instead of commas?

While writing my thesis i encountered this annoying problem/bug. When I place two figures each with a tikzpicture in one chapter, I get commas (,, ,,,,) in the pdf, spread over two pages instead of ...
1
vote
1answer
41 views

How to efficiently change the basis of a 3-dimensional figure

I'm actually rewriting a math textbook for my students. I wanted to show them that a basis isn't necessarily orthonormal. So I want to draw two figures with 2 different basisses. I found some code for ...
2
votes
1answer
45 views

Drawing a tree with rotated leaves using tikz-qtree

I'm trying to draw a tree with some text in the leaves that I'd like to rotate. The below code works fine except that the edges to the leaves are anchored to the right-hand side of the leaves rather ...
4
votes
2answers
100 views

TikZ - cropping image without misaligning textboxes and arrows

I have some image which contains text boxes and arrows (An example image is shown below). % !TeX program = xelatex \documentclass[10pt,a4paper,twoside]{report} \usepackage{tikz} \usetikzlibrary{calc} \...
3
votes
2answers
136 views

Pretty print math in tikz/pgf figure labels

I have tikz/pgfplots figures with math labels I would like to be able to reproduce with different values. I'm defining values with code like \def\a{1} at the top of the document, so I can easily ...
2
votes
2answers
76 views

Is there a more elegant implementation of this fit-to-bounding-box coordinate transform in TikZ/PGF?

I have a plottable function whose normalized domain is [0,1] and whose normalized range is [-1,1]. I also have two TikZ coordinates, (BOTLEFT) and (TOPRIGHT) defining the bottom left and top right of ...
1
vote
1answer
21 views

Using \tikzmarkin and \tikzmarkend twice in one presentation breaks highlighting in one of the tables

In the code below, highlighting works just fine for the first table if the second is commented out, but breaks when the code for the second table is not commented out. It's always the first table in ...

1
2 3 4 5
597