Quantcast

problem using Linecollection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

problem using Linecollection

A397nn
This post has NOT been accepted by the mailing list yet.
I'm simply trying to draw a couple of lines using line collection, not sure why it doesn't work

import matplotlib.pyplot as plt
from matplotlib import collections as mc
import numpy as np
import pylab as pl

segments = [ [(1,2),(3,4)],
                                [(5,6),(7,8)] ]
lc = mc.LineCollection(segments, linestyles='solid', pickradius=5, zorder=2)
fig, ax = pl.subplots()

ax.add_collection(lc)
ax.autoscale()
Loading...