Questions tagged [tikz-pgf]

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.

Filter by
Sorted by
Tagged with
10 votes
1 answer
13k views

Background image from tikzpicture does not fit the whole page

For a poster, I would like to have an image fill the whole page. This image is supposed to be drawn within a tikz environment as my other content. However, graphicx seems to fail at rescaling when the ...
Arnold Meister's user avatar
10 votes
1 answer
746 views

Badbox from PGF layer using fit

Why does the code \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds,fit} \tikzstyle{internal} = [draw, fill, shape=circle] \begin{document} \begin{tikzpicture}[scale=0.6,...
Tyson Williams's user avatar
10 votes
4 answers
2k views

How to make right angle mark in geometry 3D like this picture?

I want to mark right angle. I tried in Geogebra \documentclass{standalone} \usepackage{pstricks-add} \begin{document} \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=*,dotsize=3pt 0,linewidth=...
minthao_2011's user avatar
  • 4,534
10 votes
2 answers
1k views

make enumerated button in TikZ

Is it possible to make an enumerated button, similar to the ones shown in the figure below? I will be using them as pictures in an external document (not TeX).
BillyJean's user avatar
  • 1,733
10 votes
3 answers
6k views

Circuitikz doesn't recognize units

For example when I use \ohm or \micro it throws an error. For example, in the MWE: \documentclass{article} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) to [C=$100\ohm$](...
Andro's user avatar
  • 1,587
10 votes
3 answers
2k views

TikZ: two ellipses in different planes

How can show that two ellipses are in different planes? \documentclass[convert = false, border = 1cm]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \...
dustin's user avatar
  • 18.6k
10 votes
2 answers
3k views

How to position multiple decorations on a path while keeping their separation constant?

The at position=<value> syntax for decorations obviously makes the positioning of the decorations dependent on the path length: \documentclass{article} \usepackage{tikz} \usetikzlibrary{...
Gonzalo Medina's user avatar
10 votes
1 answer
1k views

Problem: tikz, pgfplots and external coordinates using overlay

I need to draw arrows from text to a pgfplots graph using TikZ. For some reason, the arrow coordinates are not where I want them to be in the pgfplots graph. Here is an example: \documentclass[12pt]{...
user18778's user avatar
  • 101
10 votes
2 answers
846 views

tikz, conditional setting of shape parameters

In my illustration I use simplified sketches of stopwatches (timers), which appear in three different "modes": (1) start of interval (coloured green), (2) time in progress (yellow), and time is ...
Zarko's user avatar
  • 296k
10 votes
3 answers
2k views

How can I produce such a graph of my piecewise function?

I am writing my thesis in behavioural economics and have to draw individual discount functions, I did the following graph with stata, but would love to have it with tikz. I played around in tikz and ...
Tobias Wille's user avatar
10 votes
1 answer
10k views

pgfplots axis enlargelimits [duplicate]

Possible Duplicate: Image with axis I want to place an image against the edge of an axis frame, but because of the (unknown to me) value of the enlarged limits, I can't find the coordinates both ...
Max's user avatar
  • 101
10 votes
1 answer
14k views

Help to draw a trapezoid

I would draw the isosceles trapezoid from the picture but I have a problem. Could you help me and write what I should write in latex?
user198979's user avatar
10 votes
2 answers
2k views

How to define a random number with xcolor and tikz/pgf

I tried to get a random color with xcolor and tikz: \documentclass{article} \usepackage[xetex, rgb]{xcolor} \usepackage{tikz} \begin{document} \pgfmathsetseed{1} \begin{tikzpicture} \...
ocean's user avatar
  • 981
10 votes
1 answer
8k views

how to fill intersection of 2 shapes in latex tikz package [duplicate]

I have to fill a specific region as given in the following figure. The code I have written is \begin{tikzpicture} \draw (0,0) rectangle (10,10); \draw (3.5,3.5) circle (5) node {A}; \end{...
Divya's user avatar
  • 401
10 votes
2 answers
4k views

Tikz : pgfmathresult after a pgfmathparse returns 0

I'm trying to create a generic code to draw a cycle graph. I used a code found in the net to create the nodes... But when it comes to re-use pgfmathparse and pgfmathresult, I only get as value for the ...
Jonathan Schoreels's user avatar
10 votes
1 answer
3k views

Drawing an intersection of two equations in 3D

I'm trying to draw the intersection of the following two equations: x^2+y^2=4 (a circle of radius 2) and z=x+4. I got kind of close with tikz-3dplot (which has preferrable output in my opinion), but ...
1010011010's user avatar
  • 6,357
10 votes
4 answers
7k views

TikZ - game tree representation with continuum of moves

I have been using TikZ to draw game-trees for my game-theory lectures (mostly using the automata package) but I could not figure out how to draw an arc across the edges the leave a given node. When we ...
Sergio Parreiras's user avatar
10 votes
1 answer
923 views

How to highlight specific entries in a tocloft-formatted ToC

I am writing a document using the book class, and I use tocloft in order to customize the appearance of my ToC. So far, the package did a great job for most customizations, except for one thing: I am ...
elsvene's user avatar
  • 203
10 votes
3 answers
11k views

Draw straight line/arrow from between two shapes

I am trying to draw a straight arrow from one shape to another, two rectangles precisely. I have an MWE below, but the arrow from rectangle B meets rectangle A at an angle instead of at 90 degrees. \...
picasso's user avatar
  • 616
10 votes
4 answers
900 views

Truncated at the top of the graph for a Lorentzian function

I had plotted using \usepackage{pgfplots} the Lorentzian's function f(x,\epsilon)=\frac{1}{\pi} \frac{\epsilon}{(x-x_0)^{2}+\epsilon^2}} when $\epsilon=0.5$ and $x_0=0$ i.e. $f(x,0.5) = \frac1{\...
Sebastiano's user avatar
  • 54.1k
10 votes
1 answer
543 views

Planes tangent to a cylinder

I am trying to make this graph I have had several advances compared to my original question, but I don't know how to color the part blue, This is the result that I have obtained together with the ...
Zaragosa's user avatar
  • 599
10 votes
4 answers
2k views

Shading a region between two polar curves

I'm using Tikz and have two polar curves r=1.5+cos(t) and r=1.5. I would like to fill (shade) the area between curves (shown by an arrow on the picture). How can I do this? Maybe using \clip or ...
user35603's user avatar
  • 307
10 votes
2 answers
636 views

Overlay red rectangles on top of verbatim text

I am using Beamer to prepare a presentation. In some slide I need to print a great deal of verbatim text and, also, I need to draw some red rectangles on top of it. What would be the most ...
stathisk's user avatar
  • 427
10 votes
1 answer
6k views

Using \addplot+ and \foreach in pgfplot

I have four text files with each 21 columns, and I want to plot, for each file, the first column as x, and then the 20 next columns as y. For each file, then put it all together on the same graph. It'...
Timothée Poisot's user avatar
10 votes
1 answer
7k views

PGFplots - label each group plots

In this group plot how do I add labels to individual graphs. I want to label each graph as (a), (b), (c)... \documentclass[margin=5mm]{standalone} \usepackage{pgfplots} \...
arunmoezhi's user avatar
  • 1,270
10 votes
2 answers
13k views

Align vertically two tikzpicture in subfloat

I have two sublfoat that I would like to align from the horizontal coordinate line. \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \usepackage{subfig} \begin{document} \begin{figure} ...
TeXtnik's user avatar
  • 5,843
10 votes
2 answers
5k views

Tikz: Is it possible to change line style within same \draw command? [duplicate]

Is it possible to change the line style in a tikz figure in the same \draw command? I am looking for something like: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} ...
Bichoy's user avatar
  • 1,369
10 votes
1 answer
4k views

TikZ datavisualization example fails

While trying an example from the datavisualization section of the current TikZ manual I get a strange error message. On my system I have the current MikTeX 2.9 and installed the CVS version of TikZ (...
Alexander's user avatar
  • 9,163
10 votes
2 answers
1k views

Segment marks with round caps

(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra. \documentclass[tikz,border=10pt]{standalone} \usepackage{tkz-euclide} \...
blackened's user avatar
  • 4,179
10 votes
1 answer
3k views

pgfplots: color a surf using arbitrary colors

I am trying to figure out if there is an equivalent in pgfplots to what in MATLAB is done through the following command: surf(A,B). This would plot the geometry A, using the colors specified in B. I ...
Dan's user avatar
  • 1,802
10 votes
3 answers
603 views

Typesetting A when a register is 1, B when 2, etc

I have a register \count0=<some-value> and need to get the letter of the alphabet on the index of \count0. That is, if it is 1, I need an A, if 2, a B, etc. Is this possible? I'm reluctant ...
Keelan's user avatar
  • 5,425
10 votes
1 answer
3k views

Tikz Mindmap - how to get more nodes

% Author: Till Tantau % Source: The PGF/TikZ manual \documentclass{article} \usepackage{tikz} \usetikzlibrary{mindmap,trees} \usepackage{verbatim} \begin{document} \pagestyle{empty} \begin{comment} :...
Aku's user avatar
  • 11k
10 votes
2 answers
15k views

Using gnuplot in tikzpicture environment using pgf-package

I´m trying to use gnuplot in the tikzpicture environment with the pgf package. Example \documentclass[paper=a4,12pt,version=last]{scrartcl} \usepackage[miktex]{gnuplottex} \usepackage{pgfplots} \...
esrehmki's user avatar
  • 311
10 votes
2 answers
11k views

How to draw the unit hyperbola in LaTex?

I want to make a graph of the unit hyperbola, but I'm not sure how to make it appear using pgfplots. Basically, what I'm using is this: \documentclass[12pt]{article} \usepackage{pgfplots} \begin{...
Lou's user avatar
  • 245
10 votes
2 answers
3k views

\tikzexternalize doesn't work with lua code

The following code from the pgf manual compiles fine with lualatex --shell-escape \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize \begin{document} A simple image ...
PHL's user avatar
  • 7,555
10 votes
3 answers
1k views

How to define at tikz style option to draw a dimension line between to specific points

I want to create a LaTeX package called for example dimension to provided a tikz style option named for example dimstyle. Then given two points A and B we can use this style to draw a dimension line ...
Hafid Boukhoulda's user avatar
10 votes
6 answers
1k views

Create association lines between characters

I intend to create "association lines" between characters, where the start of the line is one or more characters inside a word, and the end of the line is a single character. Something like this (...
Sverre's user avatar
  • 20.7k
10 votes
3 answers
2k views

How to get, both fork down and right in a TikZ tree or diagram

I need your help with a diagram, where I want to place both fork down and right to organize my concept map. If someone have a better solution, please give me some advice. Here´s the code: \...
Isai's user avatar
  • 4,153
10 votes
2 answers
5k views

How to draw just the arrow tip in TikZ

How can one draw "just the arrow tip" from one of the arrows in the arrow tip library in TikZ? The problem is that if you try a brute-force solution, eg. \tikz \draw[-triangle 90] (0,0) -- +(.1,0); ...
Bruce Bartlett's user avatar
10 votes
1 answer
2k views

Calendar with TikZ; only print week days

I'm trying to compose a TikZ calendar, but only want workdays printed. From the manual (I'm using v2.1): 57.1.2 Checking Dates ... workday Passed by Mondays, Tuesdays, Wednesdays, ...
Hendy's user avatar
  • 824
10 votes
2 answers
7k views

How to get started with drawing this flow chart in TikZ?

I have some old drawings prepared in Word which I would like to translate into TikZ. Being a complete novice and having never worked with TikZ before, I am really struggling with getting started. ...
Ingo's user avatar
  • 20k
10 votes
2 answers
5k views

Remove rows in a \addplot table command

Is there any way to adapt Show last N rows from input datafile only in \pgfplotstabletypeset to a \addplot table command ? This doesn't work: \documentclass{article} \usepackage{pgfplots} \...
Fernando Nadal's user avatar
10 votes
2 answers
3k views

How to change fill opacity without affecting the angle label?

Is there an easy way to change the fill opacity of the sector without changing the opacity of the angle label? I tried to use fill opacity=0.5 but the label ("$\alpha$") changes too. \documentclass{...
Andreas Schneider's user avatar
9 votes
1 answer
3k views

Alignment of tikz nodes in a chain

How can the north anchors of the nodes in a going to the right chain be aligned in a tikz picture? As can be demonstrated by the following example, by default they seem to be aligned by the center ...
Romildo's user avatar
  • 4,093
9 votes
3 answers
2k views

Simple way to draw a triangle with one side and two angles given

What's the simplest way to draw an triangle (not as a node!) with tikz with a given side and two given angles?
student's user avatar
  • 29k
9 votes
3 answers
8k views

ifthenelse inside TikZ: not working

I would like to to get this: I tried using ifthenelse inside foreach but I get an error: Missing number, treated as zero. <to be read again> = l.9 }. Here esdd says "\...
Marco's user avatar
  • 1,373
9 votes
2 answers
2k views

tikzDevice is not getting sizes right (knitr)

I am using OSX, pdflatex, R (cran), tikz/tikzDevice and knitr to create my documents. My problem is that the font sizes of the produced tikZ-file do not match the LaTeX document font sizes. Result / ...
Peater de Xel's user avatar
9 votes
3 answers
3k views

How can I represent the curved shape of a surface?

How can I give third dimension to the green surface, with shadings of color or light effects, using tikz or pgfplots? The matter is that the green surface looks (is) flat as the red one, while I ...
MattAllegro's user avatar
  • 1,546
9 votes
5 answers
2k views

Adding words centered above other words with TikZ

I'm writing a sentence, and I'd like to add labels to the elements of the sentence above those elements. In the example below, I'd like the label Verb to be centered above the verb constitutes and the ...
Sverre's user avatar
  • 20.7k
9 votes
1 answer
7k views

TikZ current page.north west shifted ~4pts?

I'm trying to draw a background grid on a page, but current page.north west is shifted down and to the right ~4pt. Anyone know how I can get the exact north west corner of the page? Here's an ...
Richard Hansen's user avatar

1
51 52
53
54 55
168