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

How to draw a line between two zy planes in TikZ?

In TikZ, I define two zy planes at two different x positions. I want to draw a line from one specific point on one plane to another specific point on the other plane. How can I draw that line? Note: ...
0
votes
1answer
34 views

Fix the stemma codicum (forest tree)

I created the following tree in LaTex using the forest package. However, there are still a couple of things that I cannot manage to fix. Could you please help me? Thank you in advance! \documentclass[...
0
votes
0answers
30 views

How do you define styles option for Tikz `\tikz{…}`?

Usually for defining TikZ styles you could add them in square brackets after the beginning of a tikzpicture, something like this: \begin{tikzpicture} [ foo/.style={shape=circle, draw} ...
0
votes
0answers
16 views

Any suggestions to Center a Tikzpicture over a two column document?

\usetikzlibrary{shapes} \usetikzlibrary{arrows} \usetikzlibrary{positioning} \begin{tikzpicture}[ hid/.style 2 args={ rectangle split, rectangle split horizontal, draw=#2, rectangle ...
1
vote
0answers
20 views

TikZ grid lines shifted slightly

I know that this is not really important, but it bothers me that I do not know if is an internal rounding error, or there are some offsets I do not know about!? The lines of a grid are shifted ...
0
votes
2answers
34 views

Drawing a arrow tip with text in it or a double arrow with different angles on both tips

I need to draw a figure as attached. Any help is appreciated. I tried a double arrow but I an unable to give different angles on both tips. Any other idea is welcome.
1
vote
1answer
29 views

Parameterized pgf shape with optional dashed lines

Based on similar questions I found on SE, I have finally managed to create a relatively simple ‘folded document’ shape in tikz with a few horizontal lines inside: \documentclass[tikz,border=1mm]{...
1
vote
1answer
31 views

Accordion Keyboard layout with TikZ

I am trying to draw accordion keyboard layout with Tikz To have results like this with modified variable, Could someone helps me to create something similar with Tikz ? Does anyone have any code ...
0
votes
1answer
22 views

How to cover a grid with another grid

In Tikz I would like to display multiple overlapping grids such that the last one covers the previous ones. This is the code and the wrong output I get, where you can see the intermediate line of all ...
4
votes
1answer
33 views

Shift polygon and center numbers of a table in Tikz

I have several questions about a table I have created for an exercise. The numbers that are inside the circles. How can they be centred? I would like to shift the purple polygon, a little to the left ...
0
votes
1answer
27 views

How to remove the tick number in tikzpicture code?

I created the code of tikzpicture in Geogebra. I want to remove the tick number leaving only the ticks. How to modify the code and remove the tick number. The code of the tick picture is: \begin{...
1
vote
1answer
21 views

Style tikz matrix borders

I am using tikz to position some nodes easily. Here is an MWE: \documentclass[tikz,border=1mm]{standalone} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix[% matrix ...
10
votes
2answers
240 views

Joining Tikz paths seamlessly

I'm trying to use Tikz to draw climbing knots. I adapted the code from this answer https://tex.stackexchange.com/a/283009/229885 to draw 3D-ish rope using Tikz paths (the basic idea is to superimpose ...
4
votes
2answers
98 views

Removing font warning

Given this simple LaTeX code \documentclass [spanish] {book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{lmodern} \begin{document} \frontmatter ...
2
votes
1answer
38 views

Question about drawing a Venn diagram for a set complement

My knowledge of TikZ is very limited. I'm drawing Venn diagrams of this style in my document: \begin{figure}[H] \centering \begin{tikzpicture} \def\firstcircle{(0,0) circle (1.5cm)} \def\...
0
votes
2answers
47 views

TikZ 'midway' that knows about the 'to' opearation

This is sort of the same as/follow up to this: TikZ coordinate that refers to the last "current coordinate" The answer to that question suggests me to use to instead of -- so that I can use \...
3
votes
2answers
61 views

TikZ: Expand stroke

I'm trying to draw some spirals and asked this question some days ago. The answer by hpekristiansen is great and helps a lot but as it's not clear if the spiral is right- or left-handed by looking at ...
0
votes
1answer
32 views

TikZ coordinate that refers to the last “current coordinate”

Is it possible, within a TikZ path, to refer to the "current coordinate" as another coordinate? To make it clear what I want, take this example, which I often end up doing because I don't ...
2
votes
1answer
41 views

Tikz trim lines at intersection

I'm trying to come up with a way to draw "parametric" right triangles, meaning that I change the length of the hypotenuse \hypo and one of the internal angles \alfa and it should draw the ...
0
votes
1answer
35 views

Cotangent function plot

I would need to plot the function y = -x cot (x), and I made this graph, but it reports me the error "! Dimension too large" I created this chart from here \documentclass[tikz,border=3.14mm]{...
1
vote
2answers
54 views

Decoration for self crossing lines/curves

Is it possible to define a decoration/postaction, for drawing a double line so that a self intersecting line will draw on top of itself? To show what I mean see these spirals: \documentclass[tikz, ...
0
votes
1answer
16 views

How to display x-coordinates near data points in pgf plot?

I know how to display y-coordinates near each datapoint using the following code \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[title={$E_0 $}, ymax=...
0
votes
1answer
37 views

How to draw curve of $f(x)=\dfrac{2x^2-4x+5}{x^2+1}$ in domain $-8:9$ with tikz?

\begin{tikzpicture} \draw[step=2cm,gray,very thin] (-8,-1) grid (9,9); \draw[thick,->] (-8,0) -- (9,0); \draw[thick,->] (0,-1) -- (0,9); \foreach \x in {-6,-4,-2,0,2,4,6,8} \...
0
votes
1answer
45 views

Tangent vector on a scaled 3d plot of a torus

Is there a way to draw a tangent vector to a torus so that it follows its rescaling? In other words, I have a plot of this type: and once scaled the torus, it comes out that Here is the code with ...
0
votes
1answer
29 views

In tikz double arrow head, increase the size of only one head

I have diagrams with arcs with heads produced with \draw[<__|-, ...] or \draw[<<__|-, ...], like in this MWE: \documentclass[tikz]{standalone} \usetikzlibrary[positioning] \begin{document} \...
1
vote
1answer
30 views

Rounding to the nearest negative integer

I am drawing an axis with tikz as follows \documentclass[12pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\xorigin}{-1} \pgfmathsetmacro{\yorigin}{0} \...
0
votes
1answer
19 views

Multiple 'discard if not' in pgfplots [duplicate]

Context: I want to plot some data from a CSV file with pgfplots. This file contains more information than needed, so I want to filter it. Filters (with discard if not from here or there) work well on ...
-2
votes
1answer
78 views

Draw Functions Using Tikz

I would like to know how I can draw curves as in the figure below using tikz.
4
votes
1answer
71 views

Why do these generate different TikZ graphs?

I tried doing some TikZ automation and got stuck in the following example: \begin{tikzpicture}[line width=0.8, ->, scale = 1.5] \tikzstyle{vertex}=[circle,fill=black!25,minimum size=17pt,...
0
votes
1answer
56 views

How shade the segment of a circle

How can the code below be modified so that the highlighted area in yellow can be shaded? \documentclass[]{article} \usepackage[margin=0.5in]{geometry} \usepackage{pgfplots} \renewcommand{\thesection}{...
0
votes
0answers
16 views

tikzpicture is shown in PDF only after the second PDFLatex call [duplicate]

I am using tikzpicture to have my logo in the top left corner. It works fine, but it is only shown after the second time when I "compile" the tex file. I tried it in the editor and also in ...
2
votes
1answer
33 views

TkzDrawAltitude no longer works, with 'Paragraph ended before \tkz@Altitude' error

One of the sections of my book draws out the dot product. The code below has worked fine for years. I'm now on Ubuntu 20.04 with the latest texlive and pgf packages, and the same command below now ...
0
votes
2answers
53 views

Creating a fill pattern for a parabolic plot

For the parabolic plot shown in the MWE below. I need to replace the fill pattern (represented by the blue lines) with arrows pointing downwards towards the black line. \documentclass{article} \...
0
votes
0answers
16 views

footcite with tikz

I have been trying to print the references at the bottom of the slide rather than within the nodes (as it does in this code) using the tikz package. Could someone suggest a nice way of printing the ...
1
vote
1answer
95 views

Conical and cylindircal spirals

I want to draw something like the following in TikZ, but, unfortunately, I'm not sure how to get to the needed result. The figure shows the path of ions in a quadrupole mass spectrometer. Outside the ...
1
vote
0answers
16 views

Sci Tick Label Number Format same magnitude

I'm trying to plot an tikzplotlib export with large numbers on the y axis. I'd like to format them as /pgf/number format/sci, which works so far. However, I'd like the numbers to all have the same ...
1
vote
0answers
34 views

Unexplainable error message with a plot using tikz and pgfplot [closed]

I am having a problem with a plot which I am unable to explain, let alone fix. A simple example is this (there is also a curve plotted from data, but I skipped it as it doesn't affect the outcome): \...
0
votes
1answer
68 views

3D box plot in Tikz LaTex

How can we make these make kinds of 3D plots easily in LaTex? Is there any easy way available so we can draw this in that and in the end we can get tikz code? Any help would be highly appreciated
-1
votes
3answers
152 views

How can I create this picture on TikZ?

I'm currently struggling on how to create this picture on TikZ. I cant seem to be able to draw the arrows properly and I cant figure out how to be able to make "columns" to make the private ...
0
votes
0answers
47 views

How to plot geographic coordinates with tikz?

Hello I'm trying to plot geographic coordinates of a route between real locations. I'm struggling to show the graph in full page or zoomed in. I searched a bit on internet and I can't seem to find the ...
1
vote
0answers
19 views

tikz overlay inside beamer onslide still occupies spaces?

\documentclass[serif]{beamer} \usepackage{tikz} \usepackage{amsmath} \begin{document} \begin{frame}{Adam Optimizer} Initialize ... Parameter $\beta_1$ is usually 0.9. Calculate momentum $$ a=b $...
-1
votes
0answers
29 views

I want to make a rectangle with one end chamfered for a drawing [closed]

so my drawing looks like this and I need to make a rectangle with one end chamfered or cut. I have uploaded a photo for reference. I want to write few things in the drawing. any help would be highly ...
2
votes
1answer
59 views

Flow chart diverging and converging arrows

Question: I am struggling to split the arrows in the flow chart. I have tried looking at similar code but cannot seem to reproduce it. How can I get the ideal output? Relevant Research: Diverging ...
1
vote
2answers
31 views

Label PGFPlot table points with coordinates

I would like to label each plotted point with its x and y coordinate. I am able to label with a single one using the MWE below. I must avoid manually labeling each point since my actual table size is ...
0
votes
1answer
47 views

Parabola with offset in tikz

The parabola seems to be plotted wrong, the vertex is located in (2,1), but tikz plot it around (-2,1). I have detected some issues while using \pgfplotsset{compat=1.14} and \pgfplotsset{compat=1.17} ...
0
votes
1answer
23 views

Unwanted Extra Circles in Tikz Neural Network (LaTeX)

Using this code, the output is as follows. Why are there extra empty circles appearing in my input layer and how do I get rid of them? Bonus points: how could I go about overlaying weight and bias ...
0
votes
2answers
50 views

How to rotate a node using atan2 function

In this tikzpicture \documentclass[margin=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{shapes.arrows} \usetikzlibrary{shapes.geometric} \...
0
votes
1answer
67 views

changing reference line of `\closedcycle`“ and ”`fill`" option in pgfplots

I have used Matlab2tikz package to obtain tikz files of some plots drawn by Matlab. They have a problem in showing colored confidence intervals using "fill" option. My conjecture is that the ...
-1
votes
1answer
37 views

Move legend down a bit more

I have 2 questions: 1- How to lower the legend so it doesn't override the x-axis 2- How can I avoid the 5*10^-2 in the x-axis and get 0.05 \documentclass[a4paper,12pt]{book} \usepackage[T1]{...
-1
votes
3answers
54 views

How drawing figure attache by TikZ?

How drawing figure attache by TikZ? \documentclass[border=0.5cm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (-2.5,0) -- (2.5,0); \draw (0,-3) -- (0,3); \end{tikzpicture} ...

1
2 3 4 5
549