> -----Original Message----- > From: mikey [mailto:abc.mi...@googlemail.com] > Sent: Friday, February 26, 2010 4:29 PM > To: matplotlib-users@lists.sourceforge.net > Subject: [Matplotlib-users] Change the size of the plotted 'o's ? > > Hi there, > > I've just made script for displaying discrete data clustered in boxes > on my graph. The plots are plotted with plt.plot(x,y,'o') and the 'o's > seem a reasonable size on screen but when I render it to file they > look huge so I'd like to reduce their size. Does anyone know how this > is done?
Mike, There are a couple of ways. See below: # untested, might have typos ~~~~ import numpy as np import matplotlib.pyplot as pl x = np.random.randn(20) fig = pl.figure() ax = pl.add_subplot(1,1,1) # you can specify the marker size two ways directly: ax.plot(x, 'ko', markersize=4) # size in points ax.plot(x, 'bs', ms=4) % ms is just an alias for markersize # or you can specify it after the plotting: X = ax.plot(x, 'ko') # X is a *list* of line2d objects... X[0].set_markersize(4) # set_ms works too # or... pl.setp(Y, markersize=4) # again, ms works. # ~~~~~~~~ For a list of all the properties you can tweak, type: pl.getp(<object>) HTH, -paul ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users