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

Workaround needed to make example inTransformations Tutorial work with log axis #3809

Closed
@dguest

Description

@dguest

I found some rather weird behavior (maybe a bug) when trying to useaxes.transData.transform((1,1)) with a log axis. The basic code to reproduce the error is below

#!/usr/bin/env python3from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvasfrom matplotlib.figure import Figureimport numpy as npfig = Figure(figsize=(8,6))canvas = FigureCanvas(fig)ax = fig.add_subplot(1,1,1)ax.set_yscale('log')          # <--- works fine without this lineax.transData.transform((1,1)) # <--- exception thrown here

The odd thing is that it seems to work fine if I givetransform a 1x2 shaped array, i.e.

ax.transData.transform(np.array((1,1)).reshape(1,-1))

Unfortunately, this means the examples in thetransformations tutorial don't work with a log axis.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp