{coordinates} is about using coordinates in diagrams.

learn more… | top users | synonyms

22
votes
2answers
6k views

Problems with TikZ calculations

When can I use functions and do calculations in TikZ? How do I make this work: \draw (0,0) arc(0:90:sqrt(15)); %not ok why is this working: \draw (0,0) arc(0:asin(1):5); %ok with ...
23
votes
4answers
11k 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?
16
votes
2answers
4k views

How can I compute the distance between two coordinates in TikZ?

Given two points (defined, for instance using nodes), I want to compute the distance between them. Is there some build in functionality in tikz to do this? If not, how can it be done using the ...
19
votes
2answers
1k views

Accessing the logic values of a TikZ coordinate

In TikZ accessing the coordinate values of a node can be done using the let syntax of the calc library or using the PGF command \pgfpointanchor. However, this values are dimensions/lengths in points ...
12
votes
7answers
2k 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 ...
5
votes
2answers
3k views

How to make a textbox with this TikZ code ?

I made this with TikZ : \usetikzlibrary{calc} \def\banlen{3} \xdefinecolor{mycolor}{RGB}{62,96,111} % Neutral Blue \def\bancolor{mycolor} \begin{tikzpicture} \draw (0.25,0.25) rectangle (5,-2); % ...
6
votes
1answer
431 views

Problem with external graphics and 3D pgfplots

I want to include an external graphics with pgfplots. I tried to follow the instructions of the manual (p45 et seq.) as carefully as possible. But the result is hoorible as hell. Here is the code I ...
15
votes
3answers
4k views

Transforming coordinates, so (0,0) from tikzpicture is put in the desired place of the page

In tikz I can perform absolute positioning, e.g. (current page.center), but how I can specify/transform the coordinates, so (0,0) within tikzpicture will end in well-defined place like center of the ...
13
votes
2answers
478 views

Is there a better way to do intersections and calculations with relative coordinates in TikZ?

I've been doing many TikZ diagrams lately and every so often I encounter a situation where I am forced to use some temporary coordinate in a \path. In the following short example, the problem is ...
9
votes
1answer
518 views

Curve synthesis - Adding two curves to get another one

Case 1: Let's say I have a few coordinates (A), (B), (C), (W), (X), (Y), and (Z) (possibily obtained through intersection, rotation, and whatnots). I draw two piecewise linear curves through (A), ...
11
votes
1answer
2k views

pgfplots - Placing Nodes on x Coordinates of a Plot

I want to plot some graphs in pgfplots and want to place nodes on the exact same x coordinate of the plot. The position of the note has to be set in x direction but free in y direction. Here is one ...
6
votes
1answer
420 views

Tikz - How to determine the coordinates in fill

How to create Candle Symbol in LaTeX I previously asked a question about making candle light and got amazing answers. To todd's answer I have another question which would help understand basics of ...
6
votes
1answer
571 views

Generalised: Accessing the logic values of a TikZ coordinate

In another question concerning Access to logic coordinates on Accessing the logic values of a TikZ coordinate I used these functions, until I came to a scaled tikzpicture and then it was off. I now ...
3
votes
1answer
134 views

How to locally specify function range in math expression

I'm creating simple coordinate transformation in order to define \tdplotsetcoord coordinates at Cartesian coord. system. MWE: \documentclass[a4paper,fleqn,leqno]{article} ...
4
votes
1answer
947 views

How to draw and annotate a spherical coordinate system

For some lecture script I am preparing I would need some descriptive images showing how to work with spherical coordinates as often seen in textbooks, i.e. a globe and some descriptive arrows ...
6
votes
2answers
2k views

Coordinates A, B: compute |B-A| and angle between +x and (B-A)

This question has two parts: why is the angle computed always 0 (should be 45) what is a straightforward way to compute distance between coordinates (there is How can I compute the distance between ...
3
votes
4answers
2k views

Using TikZ absolute coordinates

I wonder is that possible to use absolute coordinates regarding all document? Please see my example \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \filldraw[red] ...
14
votes
4answers
469 views

How to create a macro with two or three ;-separated arguments?

I want to create in 2D a point with \defpoint(1;2){A} and in 3D with \defpoint(1;2;-5){A}. I prefer a solution with TeX but it would be interesting to see if LaTeX3 is useful in this situation. I ...
13
votes
1answer
3k views

How can I express half the distance between two nodes?

I want to draw a line from node A half-way to node B in TiKZ. How can I find express the end point?
12
votes
2answers
411 views

How can I do an affine coordinate transformation in pgfplots?

It is possible to perform a general affine coordinate transformation in TikZ by combining the shift, x, and y keys (or just the generalized cm key to set the coordinate matrix and shift). This allows ...
5
votes
1answer
2k views

Circuitikz - IC circuit with relative coordinates

I've represented an IC circuit using circuitikz, but it's a bit too rough to what I prefer. In particular I would like to use relative coordinates in this case and connect them to the ``IC device'' so ...
4
votes
1answer
1k views

Box plots with symbolic x coords

I'd like to use box plots with pgfplots. As an additional feature, I'd want my x coordinates to be symbolic. Currently, only the last line from the file data/gp.dat is plotted. It works fine, if I use ...
4
votes
1answer
547 views

Referring to tikzpicture center

How I can refer to the current or some other tikzpicture's center? Is there anything like (current picture.center) or (previous picture.center)? I'm asking about straight solutions, not requiring to ...
3
votes
0answers
124 views

3d sphere style changes coordinates?

i took this one http://www.texample.net/tikz/examples/map-projections and rebuild or changed it for my use. This is a crosspost to: ...
3
votes
1answer
297 views

Curve synthesis - Adding many (mostly piecewise linear) curves

It's a follow-up to a previous question. If I could have a macro out of the solution over there, it would have been great but then I couldn't make it. The following code (to be added to the one in ...
3
votes
1answer
490 views

Using a macro for the coordinate in \coordinate

It seems that the two lines in the following code are not equivalent: \documentclass{article} \usepackage{tikz} \def\coord{(0,0)} \begin{document} % \tikz \coordinate at \coord; \tikz ...
7
votes
2answers
209 views

How to extract coordinates in the current scope (before the coordinate transformation matrix is applied)

If I extract coordinates with \pgfgetlastxy{}{}, I get changing results depending on the transformations I've applied to my draw (rotation, scale): \documentclass[margin=0.5cm]{standalone} ...
4
votes
1answer
109 views

Expressing a y-only shift with `axis direction cs` with symbolic x coords

I have a vertical bar chart with error bars. I want to put a star just above or below the error bar where the results are significant. I achieved this using the very neat trick provided in this ...
4
votes
2answers
422 views

Tikz coordinates relative to a node, and outside it

Given a rectangular node X I have access to the coordinates (X.north), (X.east) and the like. However, I want to be able to draw two sides of a right-angled triangle on top of the node. For example, ...
4
votes
1answer
217 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 ...
3
votes
1answer
107 views

Match coordinate in two different scopes

I've many small pictures, each centered at (0,0) in their own figure but i need to combine them and in the combined picture the (0,0) of the 1st picture (in a scope) should be (4,2) of the 2nd picture ...
2
votes
1answer
132 views

Apply shift to (current axis.left of origin)

I was trying to improve the solution at Drawing lines in a plot and give them a label? by using Jake's answer at How to access \xmin, \xmax, \ymin, \ymax from within PGFplots axis environment. So, ...
1
vote
1answer
82 views

Equivalent of \providecoordinate?

I am looking for something that is the equivalent of \providecoordinate in TikZ/PGFplots. This would be easy if I knew how to test if a coordinate is already defined. There are similar questions ...
-2
votes
2answers
149 views

drawing 2-D coordinates with 2 simple line in it [closed]

I want to draw this coordinates with straight lines in it... would you do me a favor and help me?