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

Support partial usetex in ps output #7741

Open
@pfigliozzi

Description

@pfigliozzi

I am trying to save some figures I made as .ps or .eps but I am getting an error. I narrowed the error down to the fact that I am using Latex for some of the text in my figure but usingrc.params['text.usetex'] = False. Here is some code that reproduces the bug:

importmatplotlibimportmatplotlib.pyplotaspltfig=plt.figure()plt.text(0.5,0.5,'Here is some text, $math mode$',ha='center',va='center',usetex=True)fig.savefig('test.ps')

The error you get isAttributeError: 'RendererPS' object has no attribute 'textcnt'

When looking atthis code in in the RendererPS class thetextcnt attribute is only added whenrc.params['text.usetex'] = True. However I am just using Latex for specific text objects with the optionusetex=True. Is there a way to save these figures as .ps or .eps?

I am using Matplotlib 1.5.1 installed via conda on Windows with python 2.7. I also tested it with Matplotlib 2.0.0b4 which also produced the same error, however I would prefer a solution for 1.5.1 if possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp