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

Right and top spine placement: set_position(('data', x)) puts the spine at x + 1 instead of x. #1960

Closed
@technobauble

Description

@technobauble

Python Version 2.7.4
matplotlib version: 1.1.1

Setting the location of the top and right spines to X is locating them at X +1. The left and bottom spines are placed as expected.

I posted this to the users list and it was verified by Goyogoyodiaz@gmail.com.

The following code demonstrates the error:

importmatplotlib.pyplotaspltf=plt.figure(1)f.clf()ax=plt.subplot(111)# spine is located at x = -1.5ax.spines['left'].set_position(('data',-1.5))# spine should be located at y = 0.5 but is placed at y = 1.5ax.spines['top'].set_position(('data',0.5))# spine should be located at x = -0.5 but is placed at x = +0.5ax.spines['right'].set_position(('data',-0.5))# spine is placed at y = 0.ax.spines['bottom'].set_position('zero')ax.set_xlim([-2,2])ax.set_ylim([-2,2])plt.show()

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