Questions tagged [coordinates]
{coordinates} is about using coordinates in {diagrams}.
430 questions
4
votes
1
answer
67
views
Calculated coordinates in TikZ-Paths
I require coordinates in a TikZ-path, which are calculated from values in a table or in a csv-file. Therefore I cannot create the coordinates using the calc-library but have to incorporate additional ...
0
votes
0
answers
30
views
How to Calculate the Scale of a TikZ Map and Create Commands for Plotting Points by Latitude and Longitude?
I am working with the TikZ map of India provided in the link. The map uses Cartesian coordinates to define locations of different states. I want to achieve the following:
Calculate the scale of the ...
0
votes
2
answers
40
views
2nd set of coordinates of \begin{picture}(w,h)(x,y) relation to \put[x1,y1]
In a book by Lamport writes the 2nd set of coordinates of \begin{picture}(w,h)(x,y) that the x,y are coordinates of the lower-left corner. So now it seems that in command \put{x1,y1} the x1,y1 are ...
0
votes
0
answers
41
views
xyz cylindrical coordinates seem to have a skew z-axis drawing a helix
I want to draw a pentagonal helix using tikz 3D.
I wrote the following to do that:
\begin{tikzpicture}
\foreach\x in {-6,...,6}{
\draw (xyz cylindrical cs:radius=1,angle=72*\x-72,z=\x-1)--(xyz ...
2
votes
1
answer
92
views
Rotate coordinaten system with PGFPlots
I want to rotate a coordinate system with pgf-plots using rotate around={angle:point}. I would expect to use (0,0) but using trial and error I found rotate around={30:(170,-220)}. Can somebody explain ...
0
votes
1
answer
108
views
Gate-All-Around FET (GAAFET) nanosheet 3d illustration
I'm trying to create a 3D representation of a GAAFET (Gate-All-Around Field-Effect Transistor) nanosheet using TikZ in LaTeX. I have attempted a 2D schematic, but I would like to improve it and create ...
0
votes
1
answer
50
views
\textbf value coordinate in bar graph
I'm trying to write the value "725" in bold using \textbf in LaTeX, but the system is giving me an error. How can I fix it?
\documentclass[14pt]{extreport}
\usepackage[lmargin=1.3in, rmargin=...
0
votes
0
answers
26
views
about a compilation error due empty space in foreach list [duplicate]
Background
I want to condense some TikZ commands with \foreach loop, but I encountered some errors. To fix this, I learnt from an answer for a past question.
\documentclass{article}
\usepackage{tikz}
...
0
votes
0
answers
114
views
How can I make a `tikzpicture's` coordinates react to TeX `dimensions`?
Further to the question I posted yesterday and received [an excellent answer answer ]2 regarding shading a block, I changed the code I was using (from just LaTeX code, using boxes etc) to tikz, using ...
2
votes
1
answer
34
views
draw command doesn't work in axis environment
I have tried to draw an ellipse in the axis environment, but whether I use axis cs or not, and even though there are no warnings, no ellipse is drawn.
This is a mwe:
\documentclass{standalone}
\...
1
vote
1
answer
72
views
What is the difference between single and double plus in tikz coordinates? [duplicate]
I've been using double plus in TikZ for relative coordinates:
\draw[-] (somecoord) -- ++(1,0);
but I have found TikZ code with single +. What is the difference between ++(dx,dy) and +(dx,dy)?
2
votes
1
answer
295
views
Easiest way to draw celestial sphere diagrams [duplicate]
I was hoping someone might be able to give some helpful advice.
I've seen this question popping up a few times on the forum, but I just find all the answers too complicated and difficult to follow.
I ...
0
votes
1
answer
44
views
Is it possible to record the exact location of a box in latex after generating a pdf? [duplicate]
In my latex quiz code, I can generate boxes for users to write like this:
\ans{3cm}
The problem is, depending on the surrounding text, the exact location of the box will shift.
Is there a way to ask ...
7
votes
2
answers
283
views
Dividing by sums in TikZ coords
I want to input mathematically calculated coordinates, containing terms which are divided by sums, into TikZ.
For instance, I would like to use something with a similar syntax to this: \def \cmd {1/(1+...
0
votes
2
answers
67
views
Tikz Display Coordinate in Node Text in Scaled Picture
Looking to display the value of a coordinate, however using the below, the value does not print out accurately.
The scale is attempted to be retreived using Recover scaling factor in TikZ and then use ...
0
votes
0
answers
31
views
Draw a three dimensional sphere with TikZ that looks like this [duplicate]
I would like to draw a simple sphere with radius 1 in a three dimensional coordinate system that has some kind of grid on its surface, i.e. like in the following picture that I found.
I was wondering ...
1
vote
0
answers
61
views
LaTeX Error: Illegal parameter number in pgfplots coordinate list
I am experiencing a persistent error when trying to compile a pgfplots scatter plot in LaTeX. The error message I receive is:
./test.tex:23: Illegal parameter number in definition of \pgfmaththisrow@....
2
votes
2
answers
120
views
Intersection -| of a named and a calculated coordinate
I want to use the intersection of a named and a calculated coordinate, in other words the y-coordinate of a named coordinate but the x-coordinate of a calculated coordinate, such as the point Z below, ...
0
votes
0
answers
37
views
TikZ: collecting defined coordinates in a list
I want to collect previously defined coordinates in a list and print them later in a \foreach-loop for debugging purposes.
The following MWE shows the list \points which ideally should be defined and ...
2
votes
1
answer
133
views
PGF is extracting wrong x/y values from a coordinate. How can I extract correct values?
Consider this MEW,
\nonstopmode
\documentclass{article}
\usepackage{tikz,amsmath}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw [gray!10](-...
1
vote
0
answers
34
views
A simple question about mfpic coordinates
I'm learning a little mfpic. I have the following code that draws just a line and
I just need to know the meaning of the coordinates: [15]{-7}{6}{-3}{3}
\documentclass{article}
\usepackage[metapost]{...
0
votes
2
answers
89
views
PGFPlots: How to properly get the x-component value of a coordinate to use it in a calculation?
How to fix the syntax of \draw (i-2) circle let \p{dgcr} = (i-2) in node at (i-2) {$d_{g,cr} = \fpeval{\x{dgcr}/0.35}$}; to make the node calculated number correct (i.e., it should be around 0.6, not ...
3
votes
1
answer
129
views
Circuitikz - aligning nodes
I was drawing circuit in tikz and find problem.
First problem: I am not able to align verticaly open nodes on the left. Is there simple solution for that?
Second problem: Is there way to get for ...
0
votes
0
answers
50
views
Default unit for x,y components of `tikzmath` coordinate is in `pt`
Lets say I want to draw a line on a grid given two points A,B:
\documentclass[tikz]{standalone}
%mixing defs and coordinates is a bad idea
\usetikzlibrary{fit,shapes,calc,matrix,math,positioning,...
3
votes
4
answers
163
views
How to pass a \def coordinate to macros
I am trying to pass a \def coordinate to a macro and got an error. Below is the code. The macro with direct passing works, but the two commented out lines don't.
\documentclass[border=1cm]{standalone}
...
1
vote
3
answers
117
views
Why doesn's naming coordinate with \foreach iterator work inside axis environment?
Without the axis environment, we can write something like this
\documentclass[beamer,crop]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\foreach \...
2
votes
1
answer
241
views
Feynman Diagrams inside circles
I'm trying to use tikz-feynman to draw Feynman diagrams encased in circles. I need the entire diagram to be inside a circle, with the lines touching the circle. This is necessary because these are ...
0
votes
1
answer
72
views
Why can't I use coordinate in coordinates?
In
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{physics}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
...
3
votes
2
answers
197
views
Roundoff error in the yticks
The following MWE
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{pgfplots,xparse}
\pgfplotsset{
compat=1.17, % Specify the compatibility version
nice_axis/.style={
...
0
votes
1
answer
109
views
tkz-fct: Define function in correct coordinates when axes have non-trivial step size
Consider the following example:
\documentclass[12pt,a4paper]{article}
\usepackage{pgfplots}
\usepackage{tkz-base}
\usepackage{tkz-fct}
\begin{document}
\begin{tikzpicture}[scale=0.8]
\...
2
votes
0
answers
40
views
page coordinate vs TeX coordinate
I am reading the synctex source code, now I found he comment mentioned two type of coordinates, page coordinates and TeX coordinates. anyone know about the two type of coordinate system? The docs only ...
1
vote
1
answer
80
views
tdplotsetrotatedcoord ' arguments
This involves making a pyramid (tetrahedral, SABCD) in a red reference frame of origin (A) = (0,0) and dimension 2 cm then tracing a green triangle on the face ((S), (B), (C))
for this it would ...
2
votes
1
answer
58
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 ...
2
votes
0
answers
73
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/...
3
votes
2
answers
85
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}
...
1
vote
1
answer
62
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:
\...
0
votes
1
answer
45
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}...
3
votes
0
answers
154
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 ...
0
votes
0
answers
64
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) {\...
1
vote
0
answers
96
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 ...
1
vote
1
answer
217
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 (...
1
vote
1
answer
42
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 ...
2
votes
2
answers
2k
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 ...
7
votes
1
answer
648
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 ...
1
vote
0
answers
36
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{...
1
vote
1
answer
176
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[...
0
votes
0
answers
34
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.
0
votes
2
answers
459
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:
\...
0
votes
1
answer
65
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 ...
3
votes
3
answers
766
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 ...