Skip to content

Inconsistent inset_axes position between show(), savefig(format='png') and savefig(format='pdf') #8120

@sorenrasmussen

Description

@sorenrasmussen

Bug report

Bug summary

inset_axes inconsistently positioned between show(), savefig(...,format='png') and savefig(...format='pdf') when the dpi option is set.

Code for reproduction

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.inset_locator import inset_axes

fig = plt.figure(dpi=150);

ax1 = plt.gca()
ax1ins1 = inset_axes(ax1, width=.7, height=.7,bbox_to_anchor=(100,100))

plt.savefig("test.pdf",format='pdf',dpi=300,bbox_inches="tight")
plt.savefig("test.png",format='png',dpi=300,bbox_inches="tight")
plt.show()

Actual outcome

PDF:
test_pdf
PNG:
test
show():
show

Expected outcome

I would expect all the results to come out the same.

Matplotlib version

  • Matplotlib 2.0.0 (conda)
  • Python 2.7.13 (conda)
  • Platform: Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy