Skip to main content

Extra visualization functions

Project description

Polyptich: easier layouting in matplotlib

import polyptich as pp
fig = pp.Figure()
ax = pp.Panel((2, 2))
ax.plot([1, 2, 3], [1, 2, 3])
fig.main.add_right(ax)

ax = pp.Panel((2, 2))
ax.plot([1, 2, 3], [1, 2, 3])
fig.main.add_right(ax)

ax = pp.Panel((2, 2))
ax.plot([1, 2, 3], [1, 2, 3])
fig.main.add_right(ax)
fig.display()

png

fig = pp.Figure()
ax1 = pp.Panel((2, 2))
ax1.plot([1, 2, 3], [1, 2, 3])
ax1.add_tag("a")

ax2 = pp.Panel((2, 2))
ax2.barh([1, 2, 3], [1, 2, 3])
ax2.add_tag("b")

ax3 = pp.Panel((2, 2))
ax3.scatter([1, 2, 3], [3, 1, 2])
ax3.add_tag("c")

ax4 = pp.Panel((2, 2))
ax4.matshow([[1, 2], [3, 4]])
ax4.add_tag("d")

title = pp.Title("Nice Hello")
legend = pp.Panel((None, 0.5))
legend.axis("off")

fig.main = title / (ax1 | ax2) / (ax3 | ax4) / legend
fig.display()

png

fig = pp.Figure()
axes = []

ax1 = pp.Panel((2, 2))
ax1.plot([1, 2, 3], [1, 2, 3])
axes.append(ax1)

ax2 = pp.Panel((2, 2))
ax2.barh([1, 2, 3], [1, 2, 3])
axes.append(ax2)

ax3 = pp.Panel((2, 2))
ax3.scatter([1, 2, 3], [3, 1, 2])
axes.append(ax3)

ax4 = pp.Panel((2, 2))
ax4.matshow([[1, 2], [3, 4]])
axes.append(ax4)
<_Figure size 640x480 with 0 Axes>
fig.main = pp.Wrap(axes, ncol = 4)
fig.display()

png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polyptich-0.0.11.tar.gz (209.1 kB view details)

Uploaded Source

File details

Details for the file polyptich-0.0.11.tar.gz.

File metadata

  • Download URL: polyptich-0.0.11.tar.gz
  • Upload date:
  • Size: 209.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for polyptich-0.0.11.tar.gz
Algorithm Hash digest
SHA256 336a130f440fb24be1effaa3ba209132a6013d5c06950816f9bbb885d4b7b434
MD5 6a6fcab14f948fd4a5b6e03818fa6eb7
BLAKE2b-256 94e8de4cfbefc29ebf7f87916f64fa1f3ff460e904bd217b3153835b8b212ec6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page