Skip to content

Clipping errors in pgf export when using fill_between and set_ylim()/ylim() #3935

Closed
@tatome

Description

@tatome

I get clipping errors when I use fill_between(), set ylim such that not all of the graph is inside the plotting area, and export to PGF. See code below:

Python:

import numpy as np
from matplotlib import pyplot as plt

np.random.seed(3)
n = 100
m = np.random.random(n)
M = m + np.random.random(n)
M[80] = 3
plt.fill_between(np.arange(n), m, M)
plt.ylim(0,2.1)
plt.savefig('test.pgf')

LaTeX:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\input{test.pgf}
\end{document}

test

System:
matplotlib: 1.3.1
Python: 2.7.6
numpy: 1.8.2
OS: 64bit Linux (Ubuntu 14.04.1)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions