Is there a way to get at all the paths with matplotlib1.3.0?
I use hexbin and create the following output: “hex31mm”
In : type(hex31mm)
I am trying to replicate my use of the method “get_paths” under “matplotlib 1.1.0” for the function below but with the newer version of “matplotlib 3.0.1”
“get_paths” under matplotlib 3.0.1, yields 802 distinct paths as below:
In : len(hex31mm.get_paths())
BUT “get_paths” under matplotlib 1.3.0, for this same object “hex31mm” yields only one path as below:
I am sure the information for all paths are part of the object even in matplotlib 1.3.0 because the hexbin figure that plots up onto the screen is the same under both matplotlib versions however I require the hexbin centres, hence my insistance of use on the “get_path” method.
The function I am trying to replicate works fine in matplotlib1.1.0 but not under matplotlib1.3.0 (is below). It is supposed to return an array (n,2), and each element of that array is the centre (x,y) of n hexbins:
def get_centres(hexbin _output):
for i in xrange(len (paths)):
cx = paths[i].vertices[idx ,0]+half_width_x
cy = paths[i].vertices[idx ,1]+half_width_y