FAQ
I still need help with this.

I'd like to have the Sample A box place itself in the optimal empty space, so as not to overly any graphing elements (if possible):



import numpy.random
import matplotlib.pyplot as plt

fig = plt.figure(1, figsize=(5,5))
fig.clf()

ax = fig.add_subplot(111)
ax.set_aspect(1)

x1 = -1 + numpy.random.randn(100)
y1 = -1 + numpy.random.randn(100)
x2 = 1. + numpy.random.randn(100)
y2 = 1. + numpy.random.randn(100)

ax.scatter(x1, y1, color="r")
ax.scatter(x2, y2, color="g")

bbox_props = dict(boxstyle="round", fc="w", ec="0.5", alpha=0.9)
ax.text(-2, -2, "Sample A", ha="center", va="center", size ,
bbox»ox_props)

plt.draw()
plt.show()

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedApr 27, '11 at 12:25a
activeJun 29, '11 at 6:41p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase