Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sketch params ignored when using PGF backend #20516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
takimata opened this issue Jun 25, 2021 · 0 comments · Fixed by #20518
Closed

Sketch params ignored when using PGF backend #20516

takimata opened this issue Jun 25, 2021 · 0 comments · Fixed by #20518
Milestone

Comments

@takimata
Copy link
Contributor

takimata commented Jun 25, 2021

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.

takimata added a commit to takimata/matplotlib that referenced this issue Jun 25, 2021
Fixes matplotlib#20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
takimata added a commit to takimata/matplotlib that referenced this issue Jul 12, 2021
Fixes matplotlib#20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
takimata added a commit to takimata/matplotlib that referenced this issue Jul 18, 2021
Fixes matplotlib#20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
takimata added a commit to takimata/matplotlib that referenced this issue Jul 23, 2021
Fixes matplotlib#20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
takimata added a commit to takimata/matplotlib that referenced this issue Aug 22, 2021
Fixes matplotlib#20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
takimata added a commit to takimata/matplotlib that referenced this issue Aug 29, 2021
Fixes matplotlib#20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
@QuLogic QuLogic added this to the v3.5.0 milestone Sep 8, 2021
tacaswell pushed a commit that referenced this issue Oct 20, 2021
Fixes #20516

PGF's `random steps` decoration seems to be the most similar,
but does not exactly match the behaviour described in matplotlib's docs.
Therefore I repurposed the `randomness` argument as a seed to give
control on how the line looks afterwards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants