Questions tagged [pgf]

PGF (Portable Graphics Format) is a plat­form- and for­mat-in­de­pen­dent macro pack­age for cre­at­ing graph­ics. It works to­gether with the most im­por­tant TeX back-end drivers and it comes with a user-friendly syn­tax layer called TikZ.

PGF (Portable Graphics Format) is a plat­form- and for­mat-in­de­pen­dent macro pack­age for cre­at­ing graph­ics. It works to­gether with the most im­por­tant TeX back-end drivers, in­clud­ing pdf­tex and dvips. It comes with a user-friendly syn­tax layer called TikZ.

PGF works with plain (pdf-)TEX, (pdf-)LATEX, and ConTEXt, and it can pro­duce either PostScript or PDF out­put.

Homepage: https://sourceforge.net/projects/pgf/.

Manual (v. 3.0.0): http://ctan.mirror.garr.it/mirrors/CTAN/graphics/pgf/base/doc/pgfmanual.pdf.

92 questions
72
votes
5 answers

How to control font sizes in pgf/tikz graphics in latex?

I'm creating graphs in pgf/tikz. When I use these in my document they are scaled, several are in minipage/subfig like environments. When this happens the font sizes are scaled with the graphics making them very small or unreadable. I've been through…
Jay
  • 2,917
  • 3
  • 18
  • 13
26
votes
3 answers

How to get one component of a tikz/PGF coordinate?

I'm trying to draw a horizontal line across my diagram. The Y coordinate of the line should be halfway between points a and b (a is below b). The left and right endpoints of the line are on the bounding box of the tikzpicture. Here's how I'm doing…
uckelman
  • 25,298
  • 8
  • 64
  • 82
23
votes
5 answers

Software to draw graphical models in plate notation

So I see graphical models expressed in plate notation in research papers and online all the time (for example: http://www.cs.princeton.edu/~blei/papers/BleiNgJordan2003.pdf). Is there a quick and easy way to produce these?? I've searched and…
JMS
  • 331
  • 2
  • 4
14
votes
0 answers

matplotlib with pgf, error: dimension too large

In using the pgf backend of matplotlib, I sometimes see an error like this: ! Dimension too large. \advance l.69 ...o{\pgfqpoint{-11.400000in}{-235.382893in}} This is from the LaTeX processing step, it will…
tsj
  • 758
  • 3
  • 23
14
votes
3 answers

Compare floating point numbers in Latex

I am trying to use \ifthenelse to do a floating point comparison. This is the pgf/tikz code, which works if \y is integer only, but not otherwise: \foreach \y in {3,3.5,...,6} { ifthenelse{\y<3}{ ... }{ ... } }
Abhi
  • 1,117
  • 2
  • 10
  • 15
13
votes
3 answers

Avoid specifying font family in PGF export of matplotlib figure

Summary I am exporting matplotlib figures as PGF to use in LaTeX. matplotlib seems to add a \sffamily addition to every text entry (axes labels, ticks, legend entries, annotations) when saving the figure as a PGF. This will stop it from properly…
krg
  • 317
  • 3
  • 11
13
votes
1 answer

Tikz: horizontal centering of group of nodes

I need to align each row of the graph to the center. I am trying to do it with xshift. Here the code: \begin{tikzpicture}[node distance=1.5cm, auto, text centered] \tikzstyle{every node}=[draw,ball]; \begin{scope}[xshift=1.5cm] …
mindhex
  • 133
  • 1
  • 1
  • 6
10
votes
1 answer

Control font size in graphics in LaTeX when scaling in minipage/subfig?

I am using pgf/tikz graphics and I'm wondering how one can control the scaling of font sizes in the graphics when using them in minipage/subfig environments? Is there a way to manually set a permanent font size for pgf/tikz graphics or in latex in…
Jay
  • 2,917
  • 3
  • 18
  • 13
7
votes
1 answer

Matplotlib 2.0 stripes in histogram

I get vertical stripes between the bins when creating a histogram with matplotlib 2.0.2, python2.7, Win7,64bit, visible both in the pdf and png created. I am usig pgf with latex to create a PDF which I will use by includegraphics in a pdflatex…
Elbrecht85
  • 85
  • 7
7
votes
1 answer

pgf/tikz: String Symbols as Input Coordinates

I'm new to pgf so i was trying out some examples from the pgfplot manual. One example is especially relevant for my current task but, alas, it would not compile. Here is the…
evolk
  • 125
  • 2
  • 7
7
votes
1 answer

matplotlib pgf: OSError: No such file or directory in subprocess.py

I try to use matplotlib to create a pgf file for LaTeX: from matplotlib.pyplot import subplots from numpy import linspace x = linspace(0, 100, 30) fig, ax = subplots(figsize = (10, 6)) ax.scatter(x,…
Mark
  • 18,730
  • 7
  • 107
  • 130
6
votes
2 answers

Showing and saving PGF plots from Jupyter Notebook

I have prepared a Jupyter Notebook with a number of matplotlib plots. Now I would like to save plots to PGF format, so I can reuse them in LaTeX. I have followed this blog post to implement that idea. Unfortunately, if I configure matplotlib to…
dzieciou
  • 4,049
  • 8
  • 41
  • 85
6
votes
1 answer

How to avoid calling latex in matplotlib (output to pgf)

I'm using matplotlib with its pgf backend to generate plots that I include in my LaTeX beamer document. I run into trouble when I use latex commands that are not defined. But for my application, I don't need matplotlib to generate the labels or…
GertVdE
  • 1,153
  • 1
  • 7
  • 12
6
votes
1 answer

Package vignette depends on tikz/pgf

My R package vignette uses tikz/pgf graphics. The R CMD check command throws an error message on operating systems where the LaTeX package tikz/pgf is not installed. On a vanilla Ubuntu system, for example, the Ubuntu package 'pgf' must be installed…
Philip Leifeld
  • 2,253
  • 15
  • 24
5
votes
1 answer

Export seaborn heatmap to full pgf

I'm trying to plot a heatmap with seaborn and export it to pgf for easy import in Latex. This works more or less, the only thing that is bothering me is that the bar for the colours is exported as an extra png. So if I run the export to pgf I get…
Patrick
  • 275
  • 4
  • 14
1
2 3 4 5 6 7