Skip to content

Sketch params ignored when using PGF backend #20516

Closed

Description

@takimata

Bug report

Bug summary
Calls to set_sketch_params() are ignored by the PGF backend and do not have any influence in the resulting pgf or pdf file.

Code for reproduction

#!/usr/bin/env python3
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.use("pgf")

mpl.rcParams.update({
    'font.family': 'serif',
    'text.usetex': True,
    'pgf.rcfonts': False,
    'pgf.preamble': [ 
            # enable this when using PGF backend with pdf output:
            #r"\usepackage{pgf}",
            #r"\usepgfmodule{decorations}",
            #r"\usepgflibrary{decorations.pathmorphing}",
        ],
})

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(range(10))

ax.spines["bottom"].set_sketch_params(scale=5, length=10, randomness=42)

fig.savefig(f"foo.pgf")
#fig.savefig(f"foo.pdf")

Actual outcome
grafik

Expected outcome
grafik

Matplotlib version

  • Matplotlib version: '3.0.2'

I am working on a fix for this.

Activity

  1. added a commit that references this issue on Jun 25, 2021
    c2469c1
  2. added 3 commits that reference this issue on Jul 12, 2021
    26a7c2a
    57fb078
    24266c9
  3. added a commit that references this issue on Aug 22, 2021
    65e9f5d
  4. added a commit that references this issue on Aug 29, 2021
    5a58788
  5. added this to the v3.5.0 milestone on Sep 8, 2021
  6. added a commit that references this issue on Oct 20, 2021
    38ab792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions