# Questions tagged [coordinates]

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

278 questions
Filter by
Sorted by
Tagged with
2answers
24 views

### Transform x coords, then set x limits

I'm trying to reproduce the following pyplot figure with pgfplots: import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 1) plt.plot(np.log(x)-np.log(1-x), np.log(x / (x + (1-x)))) ...
0answers
48 views

### Evaluate variables for positioning multiple times

Here is a working code (I'll describe it just after) : \documentclass[border=2pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{graphics} \usepackage{tikz,pgfplots} \...
2answers
67 views

### Get outermost coordinates/length in a Tikz-picture

From my previous question/answer Tikz image within a defined box (& the textpos package), @frougon provided a great solution. And now, I'm seeking to have a standard scaling for all of my Tikz-...
1answer
46 views

### Symbolic coordinates versus literal coordinates

I am trying to draw a yz-axis, and ontop of it, a rotated y'z'-axis for some work in mathematics. The following code \newcommand{\axislength}{2} \draw [->, -latex] (0,0) coordinate (O) node[above ...
1answer
87 views

### How to color tikz mindmap nodes by y-coordinate

In a mindmap, I would like to color (most) nodes according to their y-coordinate, that is, their height on the page. For this, I am accessing the viridis colormap and sample its colors. Using code ...
2answers
44 views

### How do I draw only the beginning and the end of an arrow from one node to another?

I am trying to create a node-network using pdflatex and have something very specific in mind. Below, you can find my current minimal example as a tex file that I have a problem with (compilable with ...
3answers
111 views

### How to show a “node near coord” even when it is out of bounds (with clip = true)?

I have a ybar graph using the pgfplots package in which I use nodes near coords to display y values near the tops of the bars. There are some outliers in the data, for which I'd like to show a bar ...
1answer
38 views

### Node-local coordinate system

This is essentially the same question as this, this or this, but in all three questions the picture that defines the new coordinates is positioned at (0, 0) of the tikzpicture. In my case it is not. ...
2answers
58 views

### Tikz show the corner coordinates of a rectangle

I use the following Latex script \documentclass{article} \usepackage{tikz,xcolor} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \filldraw[fill=gray!40!white, draw=black] (0,0) ...
1answer
34 views

### Local, relative, inner, intensive coordinate of one node

If often find myself writing: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node (refNode) {\includegraphics[width=5em]{example-...
1answer
47 views

### How to know the tikz working area coordinates in a beamer frame with header and footer?

In this example, slightly modified, the positionning of 'N' has been corrected with textheight to not be masked by the header: \documentclass[beamer]{beamerswitch} \usetheme{metropolis} \usepackage{...
1answer
25 views

### Use of @ in coordinate names (Tikz)

I was writing some macros for drawing timelines in Tikz and thought that it might be good to name the internal help coordinates with an @ in it. The idea is that in this way it will not conflict with ...
1answer
42 views

### Repeat nodes in tikz rectangle iteratively

So I want to fill a rectangle, like below, but without all the hassle of forlooping and getting coordinates. I want a magic command that places my symbol repeatedly inside a rectangle. Preferably ...
1answer
35 views

### tikz: draw plot by given coordinates points

I'm trying to draw, in a T=f(x) plane graphic, a curve passing through four points whose coordinates have been obtained experimentally. The x axis range is 0 to 0.5, the y axis range is 0 to 80. This ...
2answers
135 views

### Coordinate position not precise

\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,intersections} \usepackage{amsmath} \begin{document} \begin{tikzpicture}[scale=0.5] \draw[<->] (0,12) node[above]{$w$} |- (12,...
1answer
92 views

### How to declare a custom coordinate

I have created this sample diagram, where everything is aligned with the inputs of the first and gate. Would it be possible to replace these ([xshift=-15mm]bothNegated.bin 1) with a custom expression ...
1answer
79 views

### How to align coordinates vertically and horizontally in TikZ

I have points with irrational coordinates, because I'm mixing polar and Cartesian coordinates. I'd like to specify a coordinate as the x-value of one thing and the y-value of another thing. In this ...
1answer
47 views

### tikz-3dplot accumulates the transformation every time let operator is used

In follow up to my previous question, I now have the following problem with the tikz-3dplot library. Every time I use the "let" operator, the transformation matrix seems to act again on the coordinate ...
1answer
60 views

### tikz-3dplot causes problems to let operator

I am trying to use the 3d-plot library. The plan is to define some basic 2d coordinates at the beginning and then use them to define all kind of 3d points, using the "let" operator: \documentclass{...
1answer
44 views

### how to use date coordinates in non-date coordinate context?

How can I specify the x coordinates in the \draw and \node commands below using dates (e.g., 2019-03-28 instead of 5.2)? Thanks. \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \...
1answer
90 views

### How to align eso-pic & tikz coordinates

I have a grid on my beamer slides generated by: \usepackage[texcoord,grid,gridunit=mm,gridcolor=black!30,subgridcolor=gray!10]{eso-pic} I'd like to draw a rectangle in tikz with: \draw [textpos,...
3answers
253 views

### TikZ specifying barycentric coordinates using just lists of numbers

Here's what I currently have to type: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (a) at (90:3cm); \coordinate (b) at (210:3cm); \coordinate (...
1answer
48 views

### Coordinate problem with \tikzset

When using \tikzset the coordinates there are not working as I expected. Why does the red line not start inside the rectangle? I tried "\tikz \pic at (1,1) {mypic};" instead which does not seem to ...
2answers
140 views

### TikZ: Coordinate on shape vertices

I know that I can draw a rectangle with tikz using \draw (0.0,0.0) rectangle (1.0,1.0);. Is there a possibility to determine all 4 edge coordinates directly from the shape? I do can save the lower ...
3answers
83 views

### Tikz with standalone: pinning tikz coordinates to page cm

I've got something like the following: \documentclass[tikz]{standalone}% Does not support leap years. \usepackage{tikz} \usepackage[paperwidth=12cm, paperheight=25cm, margin=0cm]{geometry} \...
1answer
30 views

### X ticks different from coordinates in pgfplots

I have the following problem creating an histogram with pgfplots. I am quite a beginner, so there could be some clear mistakes. When I compile this: \begin{tikzpicture} \begin{axis}[ xtick={-0.0003, -...
1answer
62 views

### Extract specific pixel locations from latex generated pdf

Does anyone know how or which commands should i issue from within a .tex file so that the tex compiler would generate a descriptor file pointing metadata of the generated PDF (such as pixel locations ...
1answer
60 views

### Coordinates of an Intersection, outside of the axis-environment

I would like to access the x- and y-Coordinate of an intersection, outside of the axis environment. This is what I believed would solve my problem, based on this and this: \documentclass{article} \...
1answer
24 views

### Why arrow decoration position can not coincide with coordination point?

I was trying to add arrow decoration to a curve in a three dimensional plot like following % !TEX TS-program = xelatex \documentclass[UTF8]{article} \usepackage{float} \usepackage{amssymb} \...
1answer
114 views

### Visually labelling coordinates in tikz

Sometime it is very useful to be able to see where the \coordinates that you are defining really are in a diagram. I am using what I think it's an hack to do it, defining a command and then change the ...
2answers
239 views

### Edge coordinates of a regular polygon shaped node

I want to have two inverse triangle side by side. In between, there shall be horizontal arrows in between. Which coordinates do I have to specify in order to address the edges of the shape instead of ...
3answers
273 views

### Combining calc and perpendicular coordinates in tikz

As it is described there, the following does not compile: \documentclass{report} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node at (0, 0) (node1) {Hello}; \node ...
1answer
318 views

### Tikz coordinates relative to one node

Using both calc and |- would be a convenient way to refer to "inner, relative coordinates" of a node, with (0, 0) meaning node.center, (0, 1) meaning node.east and (.3, -.5) meaning somewhere precise ...
1answer
56 views

### Prevent tikz node intersection

I'm making a macro to generate a tikzpicture depending on the arguments passed into the macro. I want to be able to draw a \node only if it won't intersect with a specified x coordinate. So say my ...
3answers
351 views

### how to draw the angle bisector of a triangle

\documentclass{book} \usepackage{tikz,amsmath,amssymb,tkz-euclide} \usetkzobj{all} \usepackage{color} \usetikzlibrary{positioning}% To get more advances positioning options \usetikzlibrary{...
3answers
202 views

### Define coordinate with anchor point

I have macros that use anchor points in pgfplots to access certain coordinate. For instance, in a graph I can invoke a macro such as: \newcommand*{\DoSomethingWithXAxis}{% \draw [ultra thick, blue]...
2answers
66 views

### How can I add third point in plot?

This question is about the answer of @TorbjørnT. in Math Error: The function 'f' already exists. How can I add the third point, which has x coordinate as the mean of first two points and y ...
3answers
498 views

### Draw a Line Between Two Points described by Trigonometric Calculations

Suppose I have two points the unit circle corresponding to 30 and 60 degrees from the x-axis. I want to draw a line between these two points. \documentclass[border=5mm]{standalone} \usepackage{tikz}...
3answers
165 views

### Rectangle parallel to a radial direction

I wanted to draw a rectangle parallel to a radial direction and I achieved this, but I would like to know if there is a more elegant way to do it. Here is my MWE: \documentclass[border = 0.5cm]{...
1answer
211 views

### Tikz: display coordinate of node using let command

I am creating a graph where a node is placed. I would like to display the coordinates of that node on the axes without manually entering them. I get Tikz to retrieve those coordinates using let but ...
0answers
96 views

### Can't move starting point of rectangle [closed]

I want to draw a rectangle which starts in these coordinates: from northwest(3,0) to southeast(4,-2). Here is the code: \documentclass[11pt,a4paper,oneside]{article} \usepackage{amsmath} \usepackage{...
1answer
113 views

### How to move the origin or mirror the coordinate system?

Consider the following MWE \documentclass{scrartcl} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis} \addplot table [ ...
1answer
98 views

### Is it possible to change the direction of axis in pgfplots?

Is it possible to change the direction of one (or both) axis? I could achieve the visual result by using tikz and compute the coordinate by myself but this is obviously too long for a complex picture....
1answer
576 views

### Draw rectangle on absolute coordinates

I want to draw some rectangles on my pages. For example a rectangle will be drawn Start from top 5cm, left 4 cm End in 3 cm from right, 2.5 cm from bottom I tried tikzpicture package, but it draw ...
1answer
122 views

### Coordinates computation with tkz-euclide

In tkz-euclide, I want to draw a point with computed coordinates, like in TikZ. However I get a difficult to understand error of syntax which results in a wrong placement. The following MWE shows ...
3answers
1k views

### 3D Cartesian Coordinate System

I want to modify my three-dimensional Cartesian coordinate system as shown in the picture attached. I would like to have numbers under my ticks. I want parts of the grid to be parallel to the x_1 ...
2answers
401 views

### How to iteratively define coordinates in TikZ?

I'm attempting to iteratively define a coordinate system in TikZ. Essentially, I'd want to replicate the following using a \foreach command: \begin{tikzpicture} \coordinate (A1) at (0,0); \...
1answer
248 views

### how to draw a differential volume element with tikz

from http://www.texample.net/tikz/examples/the-3dplot-package/ I'm trying to draw with tikz a differential volume element in spherical coordinates. I do not know how to draw the four arcs between the ...
2answers
70 views

### Why coordinate indicate middle of path constructed with controls rather then the start point

Consider this example \documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,1)..controls +(2,4) and +(-2,-6)..(4,0) ..controls +(2,6) and +(-2,-6.5)..(8,0)...
2answers
255 views

### Place coordinates in a circle with foreach with tikz

I tried to place coordinates as a circle and use them later to draw lines between the coordinates. To do so I thought it should be possible to use a foreach loop which works out perfectly if I use ...