Skip to content

Multi-View Support and Major API Changes

Pre-release
Pre-release
Compare
Choose a tag to compare
@isaacrobinson2000 isaacrobinson2000 released this 07 Mar 06:56
· 42 commits to main since this release

This release includes the following changes:

  • Several getter and setter methods were removed for view axes, and replaced with the new view_specifications property.
  • Support added for constructing views that view multiple other axes at once, as demonstrated by the code snippet below:
import matplotlib.pyplot as plt
from matplotview import view

fig, (ax1, ax2, ax3) = plt.subplots(1, 3)

ax1.add_patch(plt.Circle((1, 1), 1.5, ec="black", fc=(0, 0, 1, 0.5)))
ax3.add_patch(plt.Circle((3, 1), 1.5, ec="black", fc=(1, 0, 0, 0.5)))
for ax in (ax1, ax3):
        ax.set_aspect(1)
        ax.relim()
        ax.autoscale_view()

# Axes 2 is a view of 1 and 3
view(view(ax2, ax1), ax3)

ax2.set_aspect(1)
ax2.set_xlim(-0.5, 4.5)
ax2.set_ylim(-0.5, 2.5)

fig.show()

View viewing two axes