On this thread:
http://www.mail-archive.com/[email protected]/msg05383.html
clip_on was a suggested way of getting around the clipping that happens
at the edge of a frame. In the Sage project, we are always setting the
limits on the axes via set_xlim and set_ylim. Is there any way to get
the lines and circles that pass across the edge of the usual clip
boundary to still be drawn, even if we have set the xlim and ylim of the
axis?
Basically (using an example from the gallery), is there a way to get the
scatter plot circles below not clipped, while still having the y-axis
only go from -2 to 2? If not, is there a way to easily calculate the
protrusion of the various objects, like the circles below, so we know
how much to adjust the axes to just include the circles?
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
x = np.linspace(0r,2*np.pi,100r)
y = 2*np.sin(x)
ax = fig.add_subplot(1,1,1)
q=ax.scatter(x,y)
ax.set_ylim([-2,2])
q.set_clip_on(False)
ax.set_clip_on(False)
ax.spines['left'].set_position(('outward',10))
ax.spines['bottom'].set_position(('outward',10))
ax.spines['top'].set_color('none')
ax.spines['right'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
fig.savefig('test.png')
Thanks,
Jason
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel