Questions tagged [coordinates]

{coordinates} is about using coordinates in {diagrams}.

Filter by
Sorted by
Tagged with
2 votes
1 answer
31 views

Drawing between plots with groupplots pgfplots

I am trying to create a zoom effect for the plot on the left. I make a box in it and I want to draw lines from two corners of the rectangle going to the plot on the right. I thought it might be ...
Nausicaa's user avatar
2 votes
0 answers
49 views

I cannot define tikz coordinate with foreach statement

I got a weird bug when I want to define and name a list of coordinates \tikz{ \foreach \name/\pos in {{a/(1,0)}, {b/(0,1)}} \coordinate (\name) at \pos ; } The error is {/usr/local/texlive/2023/...
JGressier's user avatar
3 votes
2 answers
65 views

Place element at each corner of minipage

General overview I try to put different elements on each corner of a minipage. MWE \documentclass[a4paper,12pt]{article} \usepackage{graphicx} \usepackage{picture} \usepackage{calc} \begin{document} ...
fauve's user avatar
  • 2,437
1 vote
1 answer
41 views

Pgfplot coordinates declared in \addplot

I am trying to plot data from a .csv with different data sets (no more than 4). I have added some additional input parameters just for debugging, at the moment the document looks like this: \...
Valentín Gutiérrez Gil's user avatar
0 votes
1 answer
29 views

Intersection coordinates change when I change values for domain

I'm trying to plot a function using Tikz/Pgfplots. Am still new to using Tikz/Pgfplots. I've created the code using various sources. Here's a MWE: \documentclass{standalone} \usepackage{pgfplots,tikz}...
Ram's user avatar
  • 113
3 votes
0 answers
56 views

Tikz: Moving the origin to a polar coordinate

Reading the documentation, I was under the impression that “++” changes the origin to that point. At the same time, I understand that a polar coordinate specifies a certain point by giving the angle ...
Renzo's user avatar
  • 153
0 votes
0 answers
53 views

Why does my \includegraphics size not match the length of the coordinate system after setting the height and width?

mycode is like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{3d} \begin{document} \begin{tikzpicture} \node[canvas is zy plane at x=0mm] (temp) at (0.0mm,0.0mm,0.0mm) {\...
梁港林's user avatar
1 vote
0 answers
83 views

How to delete duplicate points in computer generated tikz image

I used an svg file of an image as the basis for a program (this one, I think) to generate a tikz version of the image. The tikz code it produced compiles correctly and the image looks good, but the ...
Brian's user avatar
  • 149
0 votes
1 answer
83 views

Plotting coordinates from tikzmath in pgfplot axis coordinate system

Short Version I want to do some fairly complicated coordinate math to make a notional diagram but would like to use pgfplots since I have used it elsewhere in my document and want the axis styles (...
segfault's user avatar
  • 103
1 vote
1 answer
33 views

LaTeX reserving space for undrawn coordinates

I'm trying to write a function to ease the drawing of figures. I called this function \drawcurve as is shown below. It's purpose is to create a curve between 2 lines indicated by coordinates in it's ...
Siebe Arnout's user avatar
0 votes
2 answers
346 views

Simple way to position a text anywhere on a beamer frame

This might be a very easy question but somehow I have failed to find a good answer for. I wish to put a text, e.g., word/math/string, etc. on a specific location on a Beamer frame. This is probably ...
Fraïssé's user avatar
  • 3,069
7 votes
1 answer
296 views

Find the coordinates of a point in a TikZ picture, with respect to the borders drawn by standalone package

Consider a TikZ picture with a circle centred at (0,0) in the TikZ coordinate system. Surrounding the node is a complex shape, such as a curve as shown below. In the standalone package, the border is ...
Sam's user avatar
  • 113
1 vote
0 answers
34 views

tikzmath produces an error when the trigonometric functions are used [duplicate]

Why does the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{math} \begin{document} \begin{tikzpicture} \tikzmath{ coordinate \v; \v = (cos(pi),sin(pi)); } \end{...
Evan Aad's user avatar
  • 10.8k
1 vote
1 answer
80 views

How to draw nodes from a txt file using tikz

So basically, I have a tikzpicture and I would like to include 36 node inside this picture. currently, the only way I know to include them is to write \filldraw[blue] (3.8,3.6) circle (1pt) node[...
Aerosonic's user avatar
0 votes
0 answers
29 views

How can I write (xyz) coordinates in LaTeX? [duplicate]

After looking online, I can't seem to find a command to replicate coordinate notation as shown in the image below. Any help would be appreciated.
adamcurry's user avatar
0 votes
2 answers
120 views

How do I add gray grid lines to a three-dimensional plot using pgfplots?

I am trying to use pgfplots to draw a three-dimensional space. Using the following code I'm able to get the axes to show, and I know how to add coordinates and nodes and some other objects: \...
twoblackboxes's user avatar
0 votes
1 answer
45 views

TikZ - foreach substitution inside coordinate name not working [closed]

I have coordinates named a1 to a9. They were defined by \coordinate (a1) at (0,0); etc. They all have valid x and y coordinates. I need to create 9 circles whose centers are each of the 9 coordinates ...
ong99375's user avatar
2 votes
3 answers
435 views

Positioning a minipage [duplicate]

I would like to choose exactly where my minipage starts using coordinates on the page. So far I have the following, \documentclass{article} \begin{document} \begin{minipage}[x=10cm,y=5cm]{8em} The ...
curry's user avatar
  • 283
3 votes
1 answer
118 views

Foreach with different label

Is there a simple way to have display my coordinate system? \begin{tikzpicture} \draw [-latex,thick] (0,0)--(12.5,0); \draw [-latex,thick] (0,0)--(0,10.5); \foreach \y in{2,...
Alessandro Lin's user avatar
0 votes
1 answer
70 views

tikzmath arithmetic calculations using predefined variables

I'm trying to do calculations in tikzmath using some predefined variables. Here's an example of what I have \usepackage{tikz} \usetikzlibrary{math} \begin{tikzpicture} \tikzmath{ real \ang = 30; ...
TurbPhys's user avatar
  • 115
1 vote
1 answer
58 views

Define a tikz variable only inside the current tikzpicture

I want to "define" a variable inside my tikzpicture. This answer gives a solution for how to do that, using the math library. The thing I am concerned with is that when I assign \x1 the ...
tush's user avatar
  • 1,093
4 votes
2 answers
140 views

Why do two different TikZ pictures report different coordinates for the center of the page?

I saved the following LaTeX code in ~/Test.tex. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \tikz[remember picture, overlay] \draw let \p1=(current page.center)...
Evan Aad's user avatar
  • 10.8k
2 votes
1 answer
71 views

Avoid axes distortion when drawing on image in tikz

I want to draw 10 circles in a circular shape, inside a rectangle. The problem is that the 10 circles are positioned as an ellipse, and not around the circumference of a circle. I want to place the 10 ...
tush's user avatar
  • 1,093
0 votes
1 answer
40 views

How to assign a value of the form (my node.east) to a coordinate variable inside the argument of a tikzmath command?

The PGF & TikZ manual for version 3.1.9a (the current version) has this to say about the coordinate keyword of the math TikZ library (p. 706): coordinate 〈variable〉, 〈additional variables〉; This ...
Evan Aad's user avatar
  • 10.8k
-1 votes
1 answer
114 views

Diagonal coordinate grid Tikz

I am looking to make a coordinate grid with a (darker) diagonal grid (with potentially different grid length) on top of it as in the image below. I.e I would like to have a tikz image of the ...
Tejas Rao's user avatar
  • 113
3 votes
2 answers
87 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*=...
cis's user avatar
  • 7,487
2 votes
1 answer
86 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]{...
cis's user avatar
  • 7,487
0 votes
0 answers
50 views

\psframe works but \rput doesn’t in pspicture

This is my MWE : \documentclass[pstricks,border=12pt]{standalone} \begin{document} \begin{pspicture}[showgrid=top](5,5) \psframe[linecolor=red,linewidth=2pt,dimen=inner,framearc=0.5](3,1)(4,2) \...
fauve's user avatar
  • 2,437
0 votes
1 answer
36 views

How to Make a Coordinate system with 4 boxes and specific text over or under it?

I want to make a Coordinate System with 4 Boxes in it! But I am not able to: split the rectangle in to two part. Make a box without text. The axis should have a title. Do someone of you have a idea ...
herminato's user avatar
13 votes
4 answers
783 views

Tikz find coordinates of beginning and end of a shortened curved line

I have a shortened curved line drawn between 2 points. I would like to obtain the coordinates of the beginning and end of that shortened line. I tried with the following code below A and B are the ...
romain.bqt4's user avatar
1 vote
1 answer
157 views

Annotate Image based on pixel position

I have an image that I am calling inside a table via TikZ. The position I am trying to mark in this image is stored in my DB via a web application which is capturing the co-ordinates in (x,y) based on ...
Siddharth Sinha's user avatar
2 votes
2 answers
208 views

Easily create a rectangle relative to node

I have a node and I want to fill a rectangle that is 12pt larger in vertical distance and 6pt larger in horizontal distance. I know that this works \documentclass[10pt,convert={convertexe=magick,...
Pygmalion's user avatar
  • 6,155
3 votes
1 answer
115 views

The problem with relative coordinates in pgfplots

AFAIK, in latest versions of pgfplots default coordinates are axis coordinates, so axis cs is no longer required. However, there is still problem with relative coordinates. See the example below \...
Pygmalion's user avatar
  • 6,155
0 votes
0 answers
39 views

How can I write a text in determinate coordinate? [duplicate]

I'd like to write in this orange rectangle: "any subject" and "my name" in the black rectangle for all slides. So, i need to know how can I create textbox in coordinates of the ...
GABRIEL FERNANDES ROCATELLI's user avatar
5 votes
1 answer
97 views

How to create path that includes arc?

I'm trying to make something like this in one command: I'm doing this via this code: \begin{tikzpicture} \draw (0,0) circle (1); \fill[blue] plot[smooth, left] coordinates {(1,0) (0,0) (0,1)...
heblyx's user avatar
  • 2,551
0 votes
2 answers
85 views

expansion of tikz coordinates

I trid to draw a line with TikZ and failed, as the code of version 1 shows. I think this is because the expression \pgfmathresult\textwidth for the end coodinate does not expand. So I tried the code ...
lyl's user avatar
  • 2,677
0 votes
0 answers
76 views

Inferring the baseline height and bounding box widths of characters/text/equations in the 'standalone' environment

I am writing a mathematics visualisation tool using C++ and OpenGL, and want to incorporate LaTeX text and equations. I was initially looking for a C++ library to directly render LaTeX text/equations ...
niran90's user avatar
  • 204
2 votes
3 answers
110 views

Overriding the (0,0) Default When Using Pstricks Polar Coordinates

Consider the code \documentclass[12pt]{book} \usepackage{pstricks,xcolor,graphicx} \begin{document} \thispagestyle{empty} \begin{pspicture}(-5,-5)(5,12)% \psframe[fillcolor=yellow!35!brown,...
mlchristians's user avatar
  • 7,724
0 votes
2 answers
270 views

tikz: draw arc between two specific points

How can I draw between two specific coordinates? Cord are (1,0) and (5,0) \documentclass{article} \usepackage[margin=1.5cm,top=1cm,headheight=16pt,headsep=0.1in,heightrounded]{geometry} \usepackage{...
user3713179's user avatar
3 votes
1 answer
139 views

Changing the default length unit in tikz

Is there a way to change the default length unit in tikz to the ex unit? I have trouble while calculating complicated coordinates in tikz when I'm using the ex unit (I always get an error or a wrong ...
Master.AKA's user avatar
1 vote
2 answers
433 views

Using AddToHook instead of background package

Recently I found out that the background package is deprecated and one should use \AddToHook{shipout/background} (comments in Positioning relative to page in XeLaTeX with package background and '...
PLY's user avatar
  • 149
7 votes
1 answer
187 views

Derived \coordinate in TikZ

Why the code not produces the line? \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (A)+(1,0); \draw (A)--(B); \end{tikzpicture}
user258065's user avatar
1 vote
1 answer
54 views

Tikz : Point C at distance k on line AB

I'd like to define the point C on line AB such that AC=k, using the calc library and the let... in... command. This does not work, why? Is there a unit problem (C seems to be pretty close to A)? I ...
Hugues VERMEIREN's user avatar
1 vote
0 answers
27 views

Shouldn't these segment specification be equivalent? [duplicate]

According to my understanding of tikz the following two segments, both connecting the origin with the point (-1,0) should be the same. \draw[green, very thick] (0, 0) -- (-1, 0); \draw[red, very thick]...
bandi's user avatar
  • 171
0 votes
1 answer
111 views

Transform cartesian coordinates to polar coordinates

I am working with tikz. I want to draw a line that is rectangular to a certain other line and has a certain length. The coordinates are defined as cartesian. What I am searching for is a function to ...
jetrca's user avatar
  • 1
1 vote
1 answer
53 views

How do I define more than 9 points in a tikzset with the let operation?

As shown in the code below \p10 will make an error, preventing long drawings. How does one overcome this? I think this is asked here but the answer is unclear for this aplication. \documentclass{...
Toma's user avatar
  • 496
2 votes
1 answer
47 views

Tikz: matching line positions with relative positioning

I am trying to draw orthogonal lines between certain points in a body of text (an exerpt from the Bible), and am using tikzmark for anchors and relative positioning to form the line shape. I need to ...
Qohelet's user avatar
  • 119
5 votes
2 answers
130 views

How to find the widest of several nodes with Tikz

I have several nodes and I need to find which one is the widest. This example draws a vertical line in through the center of the widest node, but I know which node to choose. \documentclass[12pt,...
Jander's user avatar
  • 1,029
0 votes
0 answers
36 views

How to make a spiral in coordinate system using Tikz [duplicate]

How do I generate a figure similar to this, but the value of 600° must be 1201°, and the spiral must take 3 revolutions (1201°/360°=3 revolutions).
Aidre Cabrera's user avatar
4 votes
1 answer
118 views

How to properly create figures (such as coordinate system) in Tikz in a timely manner?

I am new to LaTex and Tikz Package. I am trying to create figures in Tikz (which was recommended to me in my previous question). This is what I had made after days of tinkering. However, I made this ...
Aidre Cabrera's user avatar

1
2 3 4 5
8