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

some problem in eps file #8901

Closed
Closed
@wqshen

Description

@wqshen

I think that is a matplotlib characteristic, when one draw a plot

importnumpyasnpimportmatplotlib.pyplotaspltx=np.linspace(0,10,500)dashes= [10,5,100,5]# 10 points on, 5 off, 100 on, 5 offfig,ax=plt.subplots()line1,=ax.plot(x,np.sin(x),'--',linewidth=2,label='Dashes set retroactively')line1.set_dashes(dashes)line2,=ax.plot(x,-1*np.sin(x),dashes=[30,5,10,5],label='Dashes set proactively')plt.xlim(1,9)ax.legend(loc='lower right')plt.savefig('test1.eps',dpi=1000)

set the xlim will force the X-axis within 1-9, the line segment outside 1-9 hide, but it just hide not be clipped,I don't know how can i actually clip elements with axes extent.

I use Adobe Illustrator to open eps file.
You see it is fine,
image
But actually it is,
image

In sometimes, this characteristic is very useful, for example, if one useplt.show() to use the interactive mode, one can drag the canvas to left or to right to see the whole line in the range 0-10.

But in eps file, i do not think this characteristic reasonably, it typically increases the eps file size.
Is it a method to change this behavior ?

Matplotlib:1.5.X or2.0.X
OS:Windows 10 orCentOS

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