Discussion:
[Matplotlib-users] pyplot.hexbin
Sebastian
2016-01-29 22:15:17 UTC
Permalink
Is there a simple way to hexbin using "pyplot.hexbin" and to return the ids
of the set of
points in each hexbin? That is to output an array of n elements
(one for each hexbin), and each element itself an array with the point ids?
The sum
of the number of inner elements would be equal the sum of all points (x,y).

Is hexbin missing this simple feature?

Or perhaps specifying C=N.arange(len(x)) then some specific
"reduced_C_function"
to return those elements. But I don't know if there is a
"reduced_C_function" available,
or perhaps one could be added?

many thanks in advance...

link:
http://stackoverflow
.com/questions/18886461/how-can-i-print-a-list-of-the-outputs-from-the-
hexbin-reduce-c-function/35088073#35088073
Benjamin Root
2016-01-29 22:26:46 UTC
Permalink
Hmm, you are right, there is no way to get back the information that hexbin
computed. The hexbin function is massive (in lib/matplotlib/axes/_axes.py)
and is a bit tangled up with the artist-handling code, too. I think it
would make sense to factor out the hexbinning component into its own
hexbin.py that others might be able to use separately.

Ben Root
Post by Sebastian
Is there a simple way to hexbin using "pyplot.hexbin" and to return the
ids of the set of
points in each hexbin? That is to output an array of n elements
(one for each hexbin), and each element itself an array with the point
ids? The sum
of the number of inner elements would be equal the sum of all points (x,y).
Is hexbin missing this simple feature?
Or perhaps specifying C=N.arange(len(x)) then some specific
"reduced_C_function"
to return those elements. But I don't know if there is a
"reduced_C_function" available,
or perhaps one could be added?
many thanks in advance...
http://stackoverflow
.com/questions/18886461/how-can-i-print-a-list-of-the-outputs-from-the-
hexbin-reduce-c-function/35088073#35088073
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Thomas Caswell
2016-01-29 22:30:50 UTC
Permalink
Factor it out and give it to numpy!
Post by Benjamin Root
Hmm, you are right, there is no way to get back the information that
hexbin computed. The hexbin function is massive (in
lib/matplotlib/axes/_axes.py) and is a bit tangled up with the
artist-handling code, too. I think it would make sense to factor out the
hexbinning component into its own hexbin.py that others might be able to
use separately.
Ben Root
Post by Sebastian
Is there a simple way to hexbin using "pyplot.hexbin" and to return the
ids of the set of
points in each hexbin? That is to output an array of n elements
(one for each hexbin), and each element itself an array with the point
ids? The sum
of the number of inner elements would be equal the sum of all points (x,y).
Is hexbin missing this simple feature?
Or perhaps specifying C=N.arange(len(x)) then some specific
"reduced_C_function"
to return those elements. But I don't know if there is a
"reduced_C_function" available,
or perhaps one could be added?
many thanks in advance...
http://stackoverflow
.com/questions/18886461/how-can-i-print-a-list-of-the-outputs-from-the-
hexbin-reduce-c-function/35088073#35088073
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Sebastian
2016-01-31 01:45:19 UTC
Permalink
Ahhhh thats too bad (that we can't recover the original ids.)
What could one (as user) do to officially request it be fixed/factored out
to numpy?
Post by Thomas Caswell
Factor it out and give it to numpy!
Post by Benjamin Root
Hmm, you are right, there is no way to get back the information that
hexbin computed. The hexbin function is massive (in
lib/matplotlib/axes/_axes.py) and is a bit tangled up with the
artist-handling code, too. I think it would make sense to factor out the
hexbinning component into its own hexbin.py that others might be able to
use separately.
Ben Root
Post by Sebastian
Is there a simple way to hexbin using "pyplot.hexbin" and to return the
ids of the set of
points in each hexbin? That is to output an array of n elements
(one for each hexbin), and each element itself an array with the point
ids? The sum
of the number of inner elements would be equal the sum of all points (x,y).
Is hexbin missing this simple feature?
Or perhaps specifying C=N.arange(len(x)) then some specific
"reduced_C_function"
to return those elements. But I don't know if there is a
"reduced_C_function" available,
or perhaps one could be added?
many thanks in advance...
http://stackoverflow
.com/questions/18886461/how-can-i-print-a-list-of-the-outputs-from-the-
hexbin-reduce-c-function/35088073#35088073
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Benjamin Root
2016-01-31 02:04:01 UTC
Permalink
You've already done it. But we encourage you to take a crack at it. I would
suggest just first factoring it out into a new file
lib/matplotlib/hexbin.py and have the current function utilize it. When
that is done, we can look to getting it into numpy as well. We will need a
copy of it ourselves for compatibility with older releases of numpy.

Let us know if you have questions!
Ben Root
Post by Sebastian
Ahhhh thats too bad (that we can't recover the original ids.)
What could one (as user) do to officially request it be fixed/factored out
to numpy?
Post by Thomas Caswell
Factor it out and give it to numpy!
Post by Benjamin Root
Hmm, you are right, there is no way to get back the information that
hexbin computed. The hexbin function is massive (in
lib/matplotlib/axes/_axes.py) and is a bit tangled up with the
artist-handling code, too. I think it would make sense to factor out the
hexbinning component into its own hexbin.py that others might be able to
use separately.
Ben Root
Post by Sebastian
Is there a simple way to hexbin using "pyplot.hexbin" and to return
the ids of the set of
points in each hexbin? That is to output an array of n elements
(one for each hexbin), and each element itself an array with the point
ids? The sum
of the number of inner elements would be equal the sum of all points (x,y).
Is hexbin missing this simple feature?
Or perhaps specifying C=N.arange(len(x)) then some specific
"reduced_C_function"
to return those elements. But I don't know if there is a
"reduced_C_function" available,
or perhaps one could be added?
many thanks in advance...
http://stackoverflow
.com/questions/18886461/how-can-i-print-a-list-of-the-outputs-from-the-
hexbin-reduce-c-function/35088073#35088073
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...