[Matplotlib-users] Plotting Hex grid

2009-12-17 Thread iCy-fLaME
I am aware of Hexbin, which is a kind of histogram with hexagonal
cells. But what if my data comes in a Hex grid to start with?

I have a 2-D array probe with sensor elements arranged in a hexagonal
close packed geometry, plotting the sensor readings in normal x-y
(rectangular grid) directly will distort every other line of the
element spacing.

What would be a good way to plot such data?

Thanks!

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Memory leak somewhere?

2009-05-26 Thread iCy-fLaME
I was trying to use matplotlib to plot a series of 2D images, but
python was using up a large amount of RAM very quickly. I don't know
matplotlib that well, so the chance are I am missing something, would
appreciate it if anyone can point me to the right direction.

I am using:
Python 2.4.3 (#1, Jan 21 2009, 01:11:33)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2

Example code to run in interpreter mode:


from numpy import zeros

x = 1651
y = 452
page = zeros((x, y)).astype('float')

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

for i in range(1000):
fig = plt.figure()
ax = fig.add_subplot(111)
cax = ax.imshow(page, cmap=plt.cm.spectral_r, extent=(-44, 176, -30,
30), interpolation = 'bicubic', vmin = -0.003, vmax = 0.003)
title = "Time = %(i)0.3es)" % {'i':i}
ax.set_title(title,fontsize=14)

fig.colorbar(cax, ticks=[-2e-3, -1e-3, 0, 1e-3, 2e-3],
orientation='horizontal')

fig.savefig('_tmp.' + str(i) + ".png", dpi=300)

### EOF 


I tired to delete everything in the namespace, but the only way I can
release the ram is by killing the python session.



Thanks for all the helps in advance.



iCy

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users