Tagged Questions

TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

learn more… | top users | synonyms (3)

2
votes
1answer
212 views

Put node on ellipse in tikz

I'm trying to make a simple drawing in tikz consisting of: An ellipse Some label inside the ellipse Another label near the curve An outer normal vector to the ellipse, again with a label Producing ...
4
votes
1answer
298 views

Circuitikz inverter bubble

I'm using circuitikz to create some logic gate diagrams. In my course we use "inversion bubbles" as a convenient shortcut instead of drawing inverters everywhere. As in inputs A and B in this image: ...
12
votes
5answers
656 views

Generating loops to produce edges for network graph of 4X4 knights problem

I want to simplify the huge list of edges in the following code, but I'm not sure how to calculate them or produce the loop over them. The result should show the network graph of the 4X4 chess board ...
10
votes
1answer
556 views

TikZ path labels and --cycle

\draw (0,0) -- node{a} (2,0) -- node{b} (2,1) -- node{c} (0,1) -- cycle; I can't find a simple way to make a label on the last edge. What I want is something like \draw (0,0) -- node{a} (2,0) ...
8
votes
1answer
563 views

How to reuse the plotmark styles from PGFPlots outside the tikzpicture environment?

In a figure caption or in the main text I want to reuse the style of the plotmarks or the combination of line and symbol as in the figure legend. As I did not find a command to reuse the legend image ...
5
votes
1answer
237 views

How to put node in an accurate place? How to use different style of font in TikZ?

I want to draw something like this: This is my code: \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz} %\usepackage[active,tightpage,floats]{preview} ...
5
votes
1answer
325 views

Controlling arrow distance from the destination node in TikZ

I'm trying to draw a simple diagram in TikZ. I used a code example from the documentation (code below). As you can see on the graphic: there is a problem with arrows that are not touching the ...
4
votes
1answer
292 views

Center subfigures; fix TikZ error

I am trying to center some figures produced by TikZ. In my example, I have three large Tikz pictures that are separate figures. I also have the same three pictures, but this time as subfigures. All ...
2
votes
1answer
418 views

error while using gnuplot in pgfplots

I am using pgfplots and tikz library for generating some figures. my problem is that I can not use gnuplot within pgfplots. I tried to compile the following code bu seemingly the gnuplot is not ...
7
votes
1answer
468 views

Typesetting inline Penrose/Cvitanovic tensor diagrams (birdtracks)

In the 50's, Roger Penrose invented a private graphical notation for tensors, which he later published. Wikipedia has a short description. It's basically a directed graph with some labels on it and ...
4
votes
1answer
350 views

Define dependencies when using tikz externalize

At the beginning of my document I have \input{tikzcommands} where tikzcommands.tex contains global settings that I want to use in the TikZ pictures. For example, in this file I define some styles. ...
12
votes
2answers
286 views

Getting arrows underneath numbers

I want to draw curved arrows underneath my numbers, does anyone know how to do this? I've tried the command \curvearrowleft but TeX doesn't recognize that line, either because I don't have the package ...
4
votes
2answers
164 views

How to split a node content/right align in tikz tree?

This is my code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{trees} \tikzstyle{bag} = [text width=8em, text centered] \begin{document} ...
3
votes
1answer
807 views

How to run gnuplot/latex from inside texshop?

I was able to write a piece of code that drew a graph in gnuplot and then using tikz embedded that into my TeX document and run it via Texshop. I am not able to do that anymore. I need to run ...
9
votes
2answers
321 views

Calculating and showing the sum of squares in a diagram

Using some plain old Metapost code I am able to create a basic plot of linear regression. The question is: Can I create a graphics with e.g. TikZ which allows me to specify a few points coordinates ...
9
votes
1answer
376 views

Creating a lattice multiplication image on LaTeX

I need an image detailing the lattice multiplication method and it should look like this:
8
votes
1answer
569 views

Does anyone know the default mark size for a circle in pgfplots?

I'd like to use the mark size option relative to the current default size of a circle mark. Page 130 of the pgfplots manual mentions that the dimension for a circle is the radius, but does not ...
7
votes
1answer
157 views

Node on a jointed TikZ path

I have the following code \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (-3,-3) rectangle (3,3); \path[draw,thick] (0,0) |- (1.5,1.5); \node at ...
8
votes
1answer
158 views

How can I position a node in the center of an arbitrary path

\documentclass{article} \usepackage{lmodern} \usepackage{tikz,times} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[scale=.3] \draw [thick] (0,6) rectangle (18,4) node ...
6
votes
1answer
116 views

How to change the distance between month label and calender

I want to know, how to decrease/increase the distance between month label and the calendar. There seem to be no "month label xshift" key. Here is an MWE to play with: \documentclass{standalone} ...
14
votes
1answer
892 views

How to draw a simple but beautiful decorative head-rule?

The picture shown below is the desired simple head-rule, but the rule width should be much thinner like 1pt. Real one: So how to use Tikz or other packages to draw this kind of line as a ...
4
votes
1answer
249 views

How do i vertically align a tikz picture inside a beamer frame

The beamer frames optinal argument [c] seems to be ignored in the following example: \begin{frame}[c, fragile, shrink] %seems to be ignored, not aligning vertically \makebox[\textwidth][c]{ % ...
4
votes
0answers
148 views

pdflatex does not overwrite existing PDF files upon compilation when using TikZ external [duplicate]

I have a LaTeX/pgf/TikZ file that I'm trying to compile. I included the library external so that I could export the file. However, the problem is that \tikzexternalize apparently doesn't have a ...
15
votes
1answer
1k views

Drawing 3D crystal lattice with tikz/pstricks

I need to draw 3D lattice of DO3 type (Ni-Mn-Al, DO3) and more complex ones. Both TiKZ and PSTricks packages draw following objects on top of previously drawn disregarding "real" 3D position. For ...
2
votes
2answers
175 views

What is the correct way to generate notation for a finite set using for loop in Latex?

I am trying to create a command that will take an index n as a parameter, and generate the the expanded form of this {a_1, a_2, a_3,...,a_n}. For my first attempt, I tried to use the syntax suggested ...
5
votes
2answers
284 views

Tikz: Using relative positioning and foreach variables

I want to generate a picture that replicates itself and slowy fades out. For that i plan to use a foreach statement and redraw the picture to its rigth. How can i use the foreach variable to position ...
4
votes
2answers
961 views

How to anchor labels in tikz for baseline alignment

LaTeX handles subscripts and superscripts nicely, automatically correcting for various sizing and placement issues. I am trying to build a function that works like subscripts and superscripts, but ...
8
votes
2answers
573 views

Use function to scale x axis

Please consider the following plot (code see bottom). The curves are the result of the function q[D]=sqrt(2*s*D/h), whereas h=0.01 and s is equal to 0.1 (blue) respectively 0.01 (green). Now, I ...
2
votes
2answers
1k views

Can't load file for bar plot

I have the following: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \begin{filecontents}{testdata.csv} Probe Mittelwert ...
10
votes
2answers
383 views

Anchors badly positioned

I am trying to overlay some transparent boxes over a picture using TikZ within a Beamer frame. The code I use is the following: \documentclass{beamer} \usepackage[spanish]{babel} ...
1
vote
1answer
308 views

Assistance on arabic text on TikZ

I attempting to use both arabic and TikZ pictures but, I have four problems: The Arabic words appear in reverse order, the first word appears finally ... The sentence is not in arc as in the English ...
1
vote
1answer
151 views

plot a function in the positive semi axes

Good morning, I would like to plot the following function: x=60-(1/6)*y. This function I'd like to be presented only in the positive side of both axes. How can I achive this? Is there a package or any ...
10
votes
1answer
461 views

Plot magnification using sub-plot within a plot!

How can I produce such kind of zooming shown in the figure? Here the selected portion is plotted again with new axis displaying more details than just magnifying the portion. One solution is to ...
8
votes
2answers
354 views

How to draw container box in TikZ? How to get it with rounded corner?

I want to draw something like this: This is what I am able to draw: This is my TikZ code: \documentclass{article} \usepackage{verbatim} \usepackage[active,tightpage,floats]{preview} ...
7
votes
0answers
497 views

TikZ exercises [closed]

I am not sure that this is a right fit for SE, but I will risk it. I was recently acquainting myself with the xy-pic package, and I found the included exercises very helpful in getting up to speed ...
9
votes
3answers
793 views

How can I strike-out arrows in tikz?

I am using the following code to draw a Directed Acyclic Graph (DAG) using tikz: \usepackage{tikz} \small{\begin{tikzpicture}[% ->, shorten >=2pt, >=stealth, node distance=1cm, ...
5
votes
2answers
205 views

Angled line problem in Tikz

I want to create two angled lines in my free-body diagram, but one of them jumps around the page when I give it an angle. Why is that and how can I solve it? Here is the MWE \documentclass{article} ...
5
votes
2answers
764 views

Merge two TikZ pictures into one

Is it possible to merge two existing TikZ pictures into one? I have two pictures of this type and want to set them beneath each other in one tikzpicture environment (and adding some arrows between ...
10
votes
1answer
5k views

How to place label in middle of line (above and below) with TikZ

\fbox{ \begin{tikzpicture}[scale=1,auto=center] \node[circle,fill=gray!20] (n1) at (2,8) {Node A}; \node[circle,fill=gray!20] (n2) at (8,8) {Node B}; \foreach \from/\to in {n1/n2} \draw ...
2
votes
0answers
381 views

How legend-entry can be possible in Tikz [closed]

I want to use legend-entry for straight line & dotted line. \begin{figure}[htp] {\small \centering \begin{tikzpicture} \draw [color=black, fill=gray!50] ( 0.2 , 1.975 )-- ( 0.3 , 2.05 )-- ( 0.4 ...
11
votes
3answers
759 views

pgfplots - Add offset to pins

I'm trying to make a bar plot for an optimization parameter in quantum physics. To be more informative, the graph should display the values of these parameters above the bars. So far I did ...
8
votes
2answers
203 views

TikZ grouping expressions in calculations

I had to do some calculations like: \node (A) {A}; \node (b) at (x,y) {B}; ((A) + (B))*2 However I could not figure out how to group it in a calc statement, I tried ($((A)+(B))*2$) and ...
3
votes
1answer
340 views

How specify tree levels nodes sizes?

I am working on a TikZ tree following the tutorial called A Lecture Map for Johannes from the TikZ manual. I am having trouble to get nodes from deeper level smaller than ones of previous level. I am ...
6
votes
1answer
159 views

Simultanious use of relative positioning and “of” notation

A rather high node has a not so high node on its rigth side. I like the positioning and sizes, but i want both node to share the same Y-Axis of their north border. \tikzstyle{big} =[rectangle, ...
2
votes
1answer
166 views

Sort of “\let” for Tikz shape?

Is there a way to redefine the name of a Tikz object in case of name conflict, like the \let command for a TeX macro? As practical case, I have define a set of path decoration that can simply be used ...
45
votes
1answer
1k views

Toward a Stamper Package

Imagine that you want to simulate a hand stamp on every page in some large documents. It must be an imperfect print, with random page-to-page variations in ink intensity, fading, rotation and blur. ...
5
votes
1answer
1k views

drawing UML class diagram does not work proper with tikz-uml /pgfsetlayers

i'm stuck and have no glue whats the problem. I'd like to draw a UML class diagram with tkz-uml package. Sadly my result is not how it should be. I try to get the example running, using following ...
6
votes
1answer
2k views

How to get larger fonts than \Huge in nodes with tikz?

I need to write large fonts which are included in nodes of a tikzpicture. When I change scale, everything changes but not fonts. Here´s my code: \documentclass[10pt,a4paper]{book} \usepackage{tikz} ...
7
votes
1answer
596 views

tikz: How to mirror the path decoration “text along path”?

I'd like to create labeled nested ellipses in tikz. The labels should follow the shape of the ellipses. I used a path decoration with pre to move the label to the right place, but I couldn't figure ...
2
votes
0answers
48 views

Drawing a vertical line between two nodes in TikZ [duplicate]

Possible Duplicate: Tikz: purely vertical arrow from nodeA.south to nodeB.north I have two nodes of different widths. I can align their left edges. I would like to draw a line from (the ...