¡@

Home 

python Programming Glossary: coll

Matplotlib: How to colorize a large number of line segments as independent gradients, efficiently

http://stackoverflow.com/questions/13622909/matplotlib-how-to-colorize-a-large-number-of-line-segments-as-independent-gradi

question One minor speedup would be adding a single line collection instead of 10000 separate line collections. As long as.. a single line collection instead of 10000 separate line collections. As long as all of the lines share the same colormap.. the same colormap you can group them into a single line collection and each can still have an independent gradient. Matplotlib..

python: how to plot one line in different colors

http://stackoverflow.com/questions/17240694/python-how-to-plot-one-line-in-different-colors

as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection xy np.random.random 1000 2 0.5.. 1 1 2 segments np.hstack xy 1 xy 1 fig ax plt.subplots coll LineCollection segments cmap plt.cm.gist_ncar coll.set_array.. coll LineCollection segments cmap plt.cm.gist_ncar coll.set_array np.random.random xy.shape 0 ax.add_collection coll..

Slice notation in scala?

http://stackoverflow.com/questions/3932582/slice-notation-in-scala

scala slice share improve this question scala import collection.IterableLike import collection.IterableLike scala implicit.. question scala import collection.IterableLike import collection.IterableLike scala implicit def pythonicSlice A Repr coll.. scala implicit def pythonicSlice A Repr coll IterableLike A Repr new def apply subrange Int Int Repr coll.slice..

How do I create a radial cluster like the following code-example in Python?

http://stackoverflow.com/questions/5089030/how-do-i-create-a-radial-cluster-like-the-following-code-example-in-python

as sch def fix_verts ax orient 1 for coll in ax.collections for pth in coll.get_paths vert pth.vertices.. as sch def fix_verts ax orient 1 for coll in ax.collections for pth in coll.get_paths vert pth.vertices vert 1 3.. ax orient 1 for coll in ax.collections for pth in coll.get_paths vert pth.vertices vert 1 3 orient scipy.average vert..