The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [coordinates]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
58 views

tcolorbox , tikzmark and distances to the borders of a tcolorbox

The last code below does a good job. Here is the output. But the API is not efficient. I would like to define my marks as in the following code. \begin{coding-python}{Basic loop Python} def oneloop(...
2
votes
1answer
44 views

How to highlight a point in line graph by drawing a circle around it?

I want to highlight a point (i.e., (3, 4.8)) in the following line graph by drawing a red circle around it. However, as you can see, the circle is not drawn at the expected position. Why? And how to ...
0
votes
2answers
37 views

Use coordinates of bounding box

Consider the following MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{latexcolors} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{scope}[local bounding box =...
2
votes
0answers
50 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} \...
1
vote
1answer
37 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 ...
8
votes
1answer
585 views

Pass a 3d coordinate via pgfkeys

I'm using 3dplot to draw in 3D. Now I want to define my own environment, called pose, that is supposed to be used inside a tikzpicture-environment. It should perform a coordinate system tansformation ...
0
votes
2answers
26 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)))) ...
5
votes
1answer
117 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 ...
1
vote
2answers
70 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-...
1
vote
1answer
51 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 ...
1
vote
2answers
52 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 ...
4
votes
3answers
141 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 ...
1
vote
1answer
47 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. ...
2
votes
2answers
69 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) ...
4
votes
1answer
252 views

pgfooclass: passing a coordinate to the constructor or method

In the stamp class example in the pgfmanual, the position for the stamp is passed in as two separate numbers, an x coordinate and a y coordinate. Is it possible, instead, to pass in a coordinate or a '...
1
vote
1answer
35 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-...
0
votes
1answer
65 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{...
1
vote
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 ...
1
vote
1answer
45 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 ...
3
votes
2answers
141 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,...
2
votes
1answer
115 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 ...
2
votes
1answer
91 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 ...
76
votes
4answers
72k views

TikZ: difference between \node and \coordinate?

What is the difference between \node and \coordinate in TikZ? Exchanging them does no visual effect in my (to be honest: still simple) pictures. When to use what?
1
vote
1answer
50 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 ...
3
votes
1answer
62 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{...
3
votes
1answer
46 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} \...
2
votes
1answer
473 views

Tikz 3d trimetric view coordinate calculation bug

I'm trying to draw a line in the x-y-plane and circles in the y-z-plane at constant x position. Problem is, that the circle is far out of position (x-coordinate of center point of the circle is ...
10
votes
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 ...
2
votes
1answer
103 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,...
5
votes
3answers
282 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 (...
1
vote
1answer
51 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 ...
4
votes
2answers
167 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 ...
3
votes
3answers
86 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} \...
2
votes
1answer
64 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 ...
3
votes
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, -...
2
votes
1answer
74 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} \...
1
vote
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} \...
2
votes
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 ...
3
votes
2answers
267 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 ...
5
votes
3answers
232 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]...
5
votes
1answer
344 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 ...
8
votes
3answers
286 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 ...
4
votes
1answer
58 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 ...
6
votes
3answers
372 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{...
6
votes
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 ...
4
votes
3answers
511 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}...
3
votes
3answers
168 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]{...
2
votes
1answer
241 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 ...
2
votes
0answers
108 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{...
3
votes
1answer
121 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 [ ...