Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pgf files created by PGF backend are incorrect for paths which extend beyond axes limits #3693

Closed
@gibbycu

Description

@gibbycu

It appears that when there is a path outside the plotting limits then not all the path coordinates get plotted. When I run the code below withxmax=1.1 versusxmax=1.0, the axvspan is plotted wrong in latex. Inspection of the pgf file for the two versions ofxmax indicates that a\pgfpathlineto command is missing in thexmax=1.1 version. I've traced it to_print_pgf_path() in the backend and the linefor points, code in path.iter_segments(transform, clip=clip): which is asking for clipped points.

Python Code

import matplotlib.pyplot as pltfig = plt.figure()ax = fig.add_subplot(111)ax.plot([0,1],[0,1],'-k')ax.set_xlim(0,1)ax.axvspan(xmin=0.5, xmax=1.1)fig.savefig('test.pgf')

Latex code

\documentclass {article}\usepackage{pgf}\begin{document}    \begin{figure}        \centering        \input{test.pgf}    \end{figure}\end{document

Here is a pic of the result after compiled with latex (pdflatex or xelatex)
untitled

However, saving to .pdf produces the right result

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp