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)

46
votes
0answers
2k views

A script language for beamer animations?

This is a follow-up question to Clever beamer animation? Writing a script that changes a tikz picture in beamer? as suggested there, I will put a bounty on this one. What I seek is a set of macros, ...
14
votes
0answers
235 views

Did one manage to get the new dvisvgm driver from PGF 3.0 to work?

Background: PGF 3.0 added a new, direct way to create SVG. It now has a dvisvgm driver (pgfsys-dvisvgm.def) which has fewer (claimed) limitations than the pgfsys-tex4ht.def driver. Except it doesn't ...
13
votes
0answers
147 views

Put Gnuplot mutiple surfaces plot in PGFplots axis environment to overcome z-buffer problem

Although PGFplots is the perfect tool for many depictions, it unfortunately does not have a properly working z buffer for intersecting surfaces (at this time, 10-09-2015). I'm trying to overcome this ...
13
votes
0answers
277 views

Is it possible to produce a context free grammar for Tikz path? node?

Even further, I would be happy to see a definition of the tikz language in the usual manner programming languages such as Java and Pascal are defined. The reason I ask is that I keep getting ...
11
votes
0answers
225 views

How to draw topological surfaces?

I am making some notes on differential geometry and topology lecture. As I know in LaTeX we can draw some very nice images. But I was not able to find any examples on surfaces, which I could use. Is ...
11
votes
0answers
87 views

Wrong marginnote positions inside a tikzpicture with XeLaTeX

The marginnote package offers the \marginnote macro. I use this inside a tikzpicture environment to place notes into the margin. While this works without problems when compiling with pdfLaTeX, this ...
10
votes
0answers
423 views

How to exclude or remove weekends from ganttchart

Hi there and sorry for the incomplete question which only a psychic could answer :-) My problem is that I want to have my nice ganttchart or time schedule, but without including weekends. As my ...
8
votes
0answers
52 views

Passing special characters to “shorthand” x+y options in TikZ

I think I understand the rules for special characters in pgfkeys key arguments: If it contains any of {,, =, ]}, it must be protected by putting the entire argument in braces. In that case, the braces ...
8
votes
0answers
100 views

Cannot use pgf-blur twice with XeLaTex

The following code \documentclass{article} %\def\pgfsysdriver{pgfsys-dvipdfmx.def} %this line does not matter \usepackage{tikz}\usetikzlibrary{shadows.blur} \begin{document} \begin{tikzpicture} ...
8
votes
0answers
3k views

How to incorporate and scale matplotlib plots in latex using the PGF backend?

I am using the pgf backend of matplotlib to generate pgf files which I want to put into my latex document using tikzscale to be able to resize them easily. Example python code: #!/usr/bin/env python ...
7
votes
0answers
90 views

\selectcolormodel{gray} not applied to \draw

Today I found something weird. When I use \selectcolormodel{} in a TikZ drawing the model is only applied to \fill and not to \draw[fill=]. Does anyone know why? \documentclass{article} ...
7
votes
0answers
248 views

HowTo: Tikz 3d Plot of an object

Hi I have problem with plotting an integration area. In the x-y-plane the area ist bounded by the polynoms 3x^2-1 and 3-x^2. In z-direction there are the limits z=0 and z=4-x-y. Now I want to plot the ...
7
votes
0answers
262 views

Special effects in TikZ leads to unprintable PDF

So I recently made a picture of the Mexican Hat Potential (related to the Brout-Englert-Higgs Mechanism of particle physics). I am more than satisfied with the graph and everything, but I noticed ...
7
votes
0answers
166 views

How to typeset a letter or grapheme specimen with alternates?

I want to print a font specimen for certain letters, each of which should cover a complete A4 page. The Open Type font contains many letters with several glyphs, which are accessible as character ...
6
votes
0answers
56 views

Barchart with Different Colors and Labels for Positive or Negative

I have a simple bar chart below and I'd like to change the color of the bars if the value associated with it is positive or negative. I'd also like to change the Y labels to use different labels ...
6
votes
0answers
94 views

Gravitational/electric field with tikzpicture

I used the package pst-electricfield, in conjunction with pspicture, to obtain a graphical representation of gravitational/electric field (see below). Is it possible to achieve the same results with ...
6
votes
0answers
112 views

Tikz generated PDF produces ? when citing references

I am trying to generate a PDF figure on the fly using TikZ (code below). The figure references from my .bib file and so when I run pdflatex the first time, the PDF gets generated with ? ...
6
votes
0answers
690 views

What is a good BPMN tool in Tikz

I'm looking for a nice package (or tool) to write BPMN diagrams directly into my documents. However, I had no luck so far. I found several tools that may help doing the diagrams, and then exporting ...
6
votes
0answers
1k views

Tikzscale, trim axis left/right, and externalizing

tikzscale and trim axis do not play well together, with the produced figure being larger than requested because it ignores the size of the labels. I was wondering whether it is possible to use both ...
6
votes
0answers
175 views

Is is possible to associate part of a drawing to a pdfcomment (or similar) interactive bubble?

It is apparently possible to put a TikZ drawing inside a pdfcomment (but using mbox). Is is possible to associate only part of a drawing (e.g. a line) to a pdfcomment? Below it is the suggested ...
5
votes
0answers
51 views

How to apply colour options to the contents of TikZ nodes when the content includes \sbox{}\usebox{}?

Thanks to Sašo Živanović for helping to identify the problem which arises as a result of my trying to apply options such as blue or text=blue to nodes within Forest trees which include turnstiles from ...
5
votes
0answers
209 views

Drawing a plane inside a sphere in TikZ

I have the following code, which is basically a modified version of the sphere example from TeXample.net. \documentclass[crop,tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,fadings} ...
5
votes
0answers
66 views

Tikz External vs. Overlay

While designing a title page in tikz I noticed a somewhat unwanted behaviour. When I use the externalize and the overlay option for a tikzpicture the output is just empty. MWE: \documentclass{book} ...
5
votes
0answers
42 views

Use of smooth in combination with text decoration in pgfplots gives error “Dimension too large”

The use of the option smooth in combination with the text decoration option gives the error "Dimension too large" Is this bug already known? What can I do? Short example code is given below. ...
5
votes
0answers
76 views

svg package interfers with opacity

As soon as I load the package svg, tikz does not handle opacity any longer. Here, an example: \documentclass{article} \usepackage{tikz} \usepackage{svg} \begin{document} \begin{tikzpicture} ...
5
votes
0answers
371 views

Transform paper folding diagram to 3D object or vice versa

I made this commands to make paper models, and I ask if it is possible to have a 3D view of them converting in tikz-3D, or backward. But it's easier to draw the flat model and generate the volume ...
5
votes
0answers
331 views

tikz: draw a piece of a path between given coordinates

I have a path in my application that I want to split up in smaller paths. These, I would like to draw with a label attached to them. Take the following image as an example: The upper arc is split ...
5
votes
0answers
613 views

Combining beamer, tikz, externalize and standalone

I've read a bunch of questions and answers on these topics as well as the documentation of the external library for tikz. I suspect I fundamentally misunderstand what I'm doing. I have a mindmap ...
5
votes
0answers
156 views

Bad segment length evaluation in Tikz l-system

I would like to draw a fractal tree with Tikz lindenmayersystems library. Here is the code I use: \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{lindenmayersystems} ...
5
votes
0answers
420 views

Chains in nested tikz pictures

I am trying to draw a complex item (consisting of multiple \nodes) as a cohesive whole using a nested \tikzpicture. My outermost picture uses a chain, onto which every \node is put. My inner picture ...
5
votes
0answers
232 views

Absolute path for pgf externalisation

The graphic externalisation works well when it is done in a subfolder of my TeX files with the command \tikzsetexternalprefix{figures/} However, I get an error message when I try to set a different ...
4
votes
0answers
57 views

\title after \begin{document}: When to do it?

My answer to Problem using \alert{} in Beamer title with metropolis theme solves an incompatibility problem between TiKZ and \title with \protect-ed contents in beamer documents. Following code ...
4
votes
0answers
45 views

Tikz/pgfplot: draw option to plot a plot file at given position

I would like to use the draw function of the tikz package to plot a 2D experimental data at a given z altitude. Since I am using some kind of projection view, I would like to fix the z position of ...
4
votes
0answers
63 views

Tikz shading Issues

In the code below if I use the following code soft clip={domain=-3:3}, I get the graph on the top. If I use soft clip={domain=-2.99:3}, I get the graph on the bottom. Why does -3 not work? ...
4
votes
0answers
40 views

pgfplots: math expressions of variables in axis style

I would like to use a calculated value of pgf variable exp(\pgfplots@data@xmin) This is a concrete example what I need \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
4
votes
0answers
55 views

Fit a title on multiple lines in a header (Friggeri CV)

I'm helping a friend with LaTeX to make her a CV that looks very nice using the Friggeri CV template. I'm experienced with it but not with Tikz, which is used to make the black header at the beginning ...
4
votes
0answers
74 views

Normalized histogram (density) in pgfplots

I have a data file containing 100 256 values ranging from 0.01 to 3, approximately. I would like to plot the density of this data set. I have the theoretical (asyptotic distribution) drawn for ...
4
votes
0answers
123 views

drawing logo with tikz

I tried to draw this logo with tikz What's the easiest way to draw it ? Any advise ? My MWE: \documentclass[12 pt,a4paper]{article} \usepackage{xcolor} ...
4
votes
0answers
78 views

Partial or entire Image Blurring in TikZ?

Partial or entire Image Blurring in TikZ? I have seen some examples of drop shadow blurring in the pgf-blur package version 1.01 by Martin Giese but this isn’t what I mean. Is it somehow possible to ...
4
votes
0answers
75 views

Problem with decorations in a small TikZ picture

When working on yesterday's update on my answer to the december challenge (a dcorated tree), I encountered a problem: if I choose the picture's dimensions to small, then it fails with Dimension ...
4
votes
0answers
56 views

How to create anchors in a foreach loop when defining a new pgfshape?

I've defined a generic pressure vessel shape in Tikz with a varying number of connection ports. I want to define anchors for each connection port in a 'foreach' loop, but I can't get it to work ...
4
votes
0answers
88 views

package for drawing polyhedrons in tikz

I need to draw some polyhedrons and their truncated versions in TikZ (while PSTRICKS has but I prefer PDFLaTeX). Below is the codes that I modified from the website for the case of a octahedron. For ...
4
votes
0answers
111 views

Calculate x-coordinate for given y-value by interpolating data from pgfplotstable

I have a text file data.txt with the following content: -2 -2 +1 +0 +1 +3 +2 +4 +2 I read it with \pgfplotstableread{data.txt}\data and then plot the second column by the first column with ...
4
votes
0answers
65 views

How can I reliably and consistently save PGF keys filtered by path to a macro for later use?

I am trying to use PGF keys in TikZ with a relatively complex key tree. (Complex by my standards, that is - I'm sure it isn't that complicated in the scheme of things.) What I hoped to do is to ...
4
votes
0answers
119 views

PGF Contour Plot with complicated (nested) functions

I have succeeded in making a simple contour plot by using the function \newcommand\expr[2]{ (-#2^4+#2^2)*e^-(#2^2+#1^2) + (cos((-#1/1.85*pi-0.45) r)/2.0-#1/3.0)/1.5 } MWE: \documentclass{report} ...
4
votes
0answers
88 views

Hyperlink a rotated nodepart

I would like to have the entire node part a link. But, it seems that once you rotate, hyperref has issues. The reference below say to place the rotated content in the hyperlink, but not sure how to do ...
4
votes
0answers
245 views

How to select a range of data within a .csv file in latex using pgfplots?

I am generating a plot of data using pgfplots in latex. I am using data from several excel files as .csv. Here is the MWE: \documentclass[border=5mm,convert]{standalone} \usepackage{pgfplots} ...
4
votes
0answers
174 views

Drawing Cross Sections of (Contours over) Torus

I have this simple torus \begin{figure} \begin{center} \begin{pspicture}(-6,-4)(6,4) \psset{viewpoint=30 10 25 rtp2xyz,Decran=30,lightsrc=viewpoint} \psSolid[object=tore,r1=2.5,r0=1.0,ngrid=36 ...
4
votes
0answers
710 views

Error using tikz externalize: can't write md5 file

I tried to use the externalize library. It worked fine when all my files where located in the same folder. Usually I am using a subfolder as build folder, where all generated files should be stored. ...
4
votes
0answers
134 views

How can I get arrows to attach to outside of rectangle split in a graphdrawing layout?

I'm trying to make use of the newer (pgf > 3.0) graphdrawing layouts to do class diagrams, but I can't seem to figure out how to get arrows to attach to the outline of a rectangle split. I've read ...