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

learn more… | top users | synonyms

14
votes
8answers
5k views

Transform defined coordinates in TikZ

Say I have a triangle with vertices defined using \coordinate (a) at (0,0); \coordinate (b) at (1,0); \coordinate (c) at (0,1); Let us denote by T(x,y) the triangle defined by (a),(b) and (c) which ...
2
votes
0answers
44 views

Nested coordinate calculations

I have the following coordinate calculation \coordinate (a0) at ($(c1)!0.5!(c2)$); \coordinate (a1) at ($(c3 -| a0) + (1,3)$); \draw (a1) rectangle (b1); I wanted to eliminate the first coordinate ...
3
votes
1answer
55 views

TikZ > Is it possible to use the identifier of coordinates as string?

I am drawing pictures with TikZ using loops, for instance \foreach \point in {(i),(j),(k)} {...}. Is it possible to use the name of the coordinates as string to label a node? I'd like to use \node at ...
4
votes
1answer
54 views

How to fix the position of (0, 0) to (current page.south west) for every tikz picture?

I need to draw severals tikz picture of varying size. Each picture is on a separate page. The coordinate system should be fixed, though. Whenever I do \node at (0, 0) {hello}; 'hello' should be on ...
0
votes
0answers
38 views

Spherical shell

I'd like to draw a figure like this using Tikz, anyone can help me?
3
votes
2answers
82 views

Express boxes properties in tikz coordinates

In my understanding, any LaTeX box displays such fundamental properties: .. and anything is wrapped into a LaTeX box. So, when I produce a tikz picture, it must be somehow wrapped into a box. ...
3
votes
0answers
56 views

Arrows, coordinates and labels

Please, consider the MWE below. \documentclass[border=3mm, tikz, preview]{standalone} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[ LM/.style = ...
5
votes
2answers
160 views

Problem with relative coordinates within \draw command

I've got a problem with the following code. I'm trying to draw a circuit using circuitikz. However, the current source should be shifted by 1 unit in the x-direction, so that it is placed parallel to ...
0
votes
1answer
47 views

Centering tikz picture in geometry layout

This question regards centering of tikz picture in geometry layout. The question combines two answers that were answered here in tex.stackexchange. The first answer explains how to position the tikz ...
2
votes
1answer
133 views

Exact Tikz coordinate at geometry layout

I place several images on one page using Tikz. I use geometry layout. I would like to find out exact coordinate of the left top corner of the layout page (not the real page). I have found out ...
3
votes
1answer
73 views

Is there any way to draw the same shapes at different positions efficiently, for example \foreach?

I know there is a similar question, but I do not think it gave the best solution. Here is my code: \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \clip(-0.5,-1) ...
1
vote
1answer
50 views

Define position of line by parameters (Tikz)

It is possible to give in the coordinate of the point by an outside variable? For example, I have a simple line: \begin{document} \draw (0,0) -- (5,5); \end{document} I would like to parametrize ...
4
votes
1answer
258 views

How to create a date and time plot with TikZ and pgfplots

What I want to achieve is a graph, which shows the working hours per day. Input should be the triple of date, arrival time and leaving time. The x-axis holds the dates and the y-axis shows the working ...
4
votes
1answer
104 views

Working with perpendicular coordinates in circuitikz

Inspired by Paul Gessler's answer to this question, I decided to give it a try and adapt the following diagram to use perpendicular coordinates: \documentclass{standalone} \usepackage{circuitikz} \...
6
votes
3answers
122 views

Pgfplot coordinates in another pgfplot

How can I transform coordinates from the first axis plot to the second axis plot with a different scale? One way is to repeat all function calls. But if I've got a random function how can I get the ...
7
votes
1answer
143 views

Linear transformation Coordinates

I want to transform the canonical coordinates system , i.e. whose basis vectors are (1,0) and (0,1): \documentclass[a4paper, 12pt]{report} \usepackage{fullpage}[1cm] \usepackage{tikz} \usepackage{...
1
vote
1answer
73 views

tikz plot coordinates decorations change between points

I have a plot of coordinates \draw plot [smooth] coordinates{ (-3.1,-0.5) (-1.5,0.3) (0,0) (1.8,0.64) (3,0.5)}; Is there a way to have the curve between (0,0) and (1.8, 0.64) painted thick? I ...
4
votes
1answer
122 views

Relative coordinates after cycle with transform

When I was trying to understand this question I discovered a strange behavior when we use relative coordinates just after cycle in a transformed path. Here is an example (the black path) : \...
2
votes
0answers
43 views

Grid and label in a coordinate with a different angle betwenn the axis

I have drawn a coordinate with an angle of 30 degrees betwenn the x- and the y- axis like this: \documentclass[border=3mm,tikz]{standalone} \usetikzlibrary{arrows} \begin{document} \newcommand{\...
4
votes
1answer
65 views

Code with foreach AND coordinate does not compile - but if i remove one or the other, it compiles

Based on this question i did some experiments with tikzset, coordinates and foreach. The following code plots four times the same thing. Twice with and twice without a tikzset. Twice with and twice ...
2
votes
1answer
71 views

Calculation of coordinates in 3d with the 3dstructuralanalysis library

The tikz library structuralanalysis provides the pointcommand. %------------------------------------------------ % point %------------------------------------------------ % \point{...
3
votes
1answer
149 views

Rotating axes in 3D for better viewing planes

I have this code: \begin{figure}[h!] \centering % Generat amb TikZ \begin{tikzpicture} % Note: the points have coordinates (x,z,y) \coordinate (O) at (0,0,0); ...
4
votes
1answer
204 views

Fit node to another node in a separate scope that has been shifted and canvas transformed

I want to fit a node to another node which is defined in a different scope which has been subject to the options "(x)shift and transform canvas" (see example code and image). Without any canvas or ...
4
votes
2answers
520 views

Draw perpendicular line from intersection to axes

I want to draw perpendicular lines from the intersecting points to the axes. \documentclass{standalone} \usepackage{pgf, tikz} \usetikzlibrary{plotmarks,arrows,calc} \usepackage{pgfplots} \begin{...
2
votes
1answer
92 views

Confusion about the coordination system of 3D

I am drawing a 3d framework. I use something like (xyz cs:x = 12, y = 6, z = -6) to specify a coordination. However, the figure I produced looks ugly. Especially, the coordinations at the corners of ...
14
votes
3answers
3k views

Draw in cylindrical and spherical coordinates

I can try to draw this in TikZ: I managed to draw the coordinate axis. The first image is in cylindrical coordinates and the second in spherical coordinates. I don't know draw in spherical ...
2
votes
0answers
59 views

Coordinate naming in custom Tikz package

I want to make my own Tikz library/package or just a set of commands for making hydraulic diagrams within the Tikz environment. Say I want to draw a valve like (b) with the notation for the nodes in (...
3
votes
1answer
99 views

Tikz: draw line forming a specified angle with another line

Let us consider a setting where I have two coordinates A and B. The points have been built through a series of fransformations, so I don't really know their coordinates. Now I want to build point C ...
3
votes
1answer
135 views

Using a macro inside a Tikz coordinate calculation

I am trying to create a general macro that prints a particular custom character, based on an answer to a previous question of mine. Here is a minimal (non-)working example: %!TEX encoding = UTF-8 ...
4
votes
3answers
421 views

Draw uniform lines/grid on a distorted square/axes?

I want to draw a square discretised by equally spaced lines. However, if I move one of the nodes, say node 4, the grid lines will keep it's relative spacing (see the image). I have no idea what to ...
3
votes
1answer
90 views

Joining different TikZ pictures

I want to draw a line from one part of the text (on the page) to another part. I'm storing (relative) coordinates, and this is the reason why my MWE doesn't work. Is there any way, using TikZ, of ...
2
votes
1answer
135 views

Drawing on an image with TikZ using own coordinate system

I do a lot of mapping, and regularly draw on images using the scheme outlined earlier (Drawing on an image with TikZ) on a 0-1/0-1 grid. I need to produce multiple scalings of the same mappings and it ...
5
votes
1answer
88 views

Change coordinate order in TikZ

I want to change the order of entering coordinates in TikZ. In 2D-coordinates it is (x,y) as in (right/left, up/down). As soon as I enter a third coordinate, TikZ just adds the third coordinate at ...
8
votes
1answer
732 views

Specify x and y in different coordinate systems in pgfplots similar to gnuplot

In gnuplot you can specify positions in several coordinate systems: First, Second, Graph, Screen, Character. What are the equivalents in pgfplots? I know the following: First : axis cs: Second : ...
6
votes
2answers
171 views

TikZ Macro for Placing an “X” by Coordinate

I would like to make a TikZ macro that will: Have an optional argument of coordinates Place X centered at those coordinates. Is this possible? This is how I put two X's on a 10x10 grid manually. (...
4
votes
1answer
104 views

Automatic generation of custom coordinate system in tikz (syntax problem?)

I am writing a Python script to draw large diagrams with TikZ. These diagrams require a (d+1)-dimensional coordinate system with coordinates say a0,a1,...,ad. How can I define a coordinate system in ...
3
votes
1answer
414 views

What's the difference between xshift/yshift and relative coordinates while drawing an arrow between nodes?

Last night I crafted this piece of LaTeX, using relative coordinates to join nodes with arrows: \documentclass[a4paper,10pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} %for [above], [...
2
votes
3answers
124 views

TikZ rotating coordinate problem

I am trying to rotate point (B0) by 90 degrees ccw around (A1) and then loop it to get (B\k) and (A\k). What am I doing wrong? \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[...
12
votes
4answers
620 views

Storing and re-using tikz coordinates for position and tangent vectors

The following code \documentclass[border=5pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \usetikzlibrary{arrows,backgrounds,patterns,shapes.geometric,calc,...
2
votes
1answer
131 views

Tikz : drawing a parallelogramm question (summing nodes)

I'd like to caclculate the coordinates of C knowing A,B,D in the ABCD parallelogramm. This works fine : \coordinate (C) at ($(B)!.5!(D)!-1!(A)$) ; This doesn't work, why ? \coordinate (C) at ($(B)...
1
vote
3answers
257 views

How to define coordinates in Tikz?

I'm having a hard time figuring out how Tikz decides how to map the 2d coordinates I give it to the area I've given it to draw in. Sometimes it seems like it will auto-size based on what I've drawn ...
3
votes
1answer
184 views

How to find angle of vector sum

(Hey all, i think this is my first question here, so I'll try to get it right) I am trying to create a space vector sine wave. The phasor is created as the sum of the three phases, but I cannot get ...
1
vote
0answers
57 views

Polar Coordinates Graph using TiKz [duplicate]

I have to create a Tikz picture of a limacon which is given in polar coordinates by the equation r = 0.5 + cos(θ) for θ between 0 and 2π. Note:makethe x-axis between 􀀀0.2 and 1.7 with a scale of 3 ...
1
vote
0answers
303 views

Drawing a solid angle vector/cone in TikZ?

I would like to draw a "solid angle vector/cone" pointing in a specified direction in spherical coordinates and having a specified opening size (dσ or a in the examples below), akin to the examples ...
3
votes
2answers
190 views

How to create this coordinate system?

I'm currently working on a term paper / lecture notes for my electrical engineering professor and wanted to include the following coordinate system / graph / figure in my paper. (The image should be ...
1
vote
0answers
32 views

How to know the coordinate for Tikz drawing? Is there a way to show the coordinates in Texmaker? Thank you

I have trouble in "estimating" the coordinates in an a0 size poster. How do I know the exact coordinate in the paper? Is there grid or ruler in Texmaker to help me? Thank you.
2
votes
1answer
378 views

Tikz coordinate calculations inside foreach

As part of a drawing that will go with an explanation of diffraction, I want to draw the "outer rays" of a beam of light and draw several rays in between. An MWE of how I'm going about this is shown ...
4
votes
1answer
220 views

Why are my symbolic x coordinate labels printed twice in a tikz plot?

I'm trying to plot a bar graph, using symbolic x coordinates. For some reason, the name of some symbolic coordinates appears under the x axis more than once. If I increase the width (e.g. 12cm) ...
8
votes
3answers
2k views

Tikz: Placing a node relative to the (rectangular) coordinates of another

How do I place one node relative to the coordinates of another? In theory: \begin{tikzpicture} \node (source) {X}; \node (destn) {Y} at source.coordinates +(2,1); \end{tikzpicture} would ...
2
votes
1answer
245 views

How to define node / coordinate with perpendicular

How to define / save a point for later usage with x/y-coordinates of other points? I tried to use the perpendicular coordinate system shortform |- and -| but could not define points that way. In ...