|
From: John H. <jdh...@ac...> - 2005-02-11 20:52:27
|
>>>>> "Ted" == Ted Drain <ted...@jp...> writes:
Ted> Is there an easy way to plot multiple collections of points
Ted> connected by a line and have only a single legend entry show
Ted> up? It would also be nice if any modifications to that entry
Ted> (marker, color, etc) would affect all the line segments.
Not 100% sure what you are after here. You can control which lines
and patches get passed to the legend by explicitly passing them (as
opposed to using the autolegend capabilities). Eg
ax.legend((l1, p1), ('A line, 'A patch')
Also, have you looked into the LineCollection class -- this sounds
like it would support some of what you are describing. Perhaps if you
explain a bit more.
Ted> Ted PS: we also need some way to draw only the n'th marker in
Ted> a line plot. We plot a lot of trajectories where time is
Ted> progressing along the line so it's useful to generate the
Ted> plot using 1 minute data (for example) and then have a marker
Ted> be displayed every 60'th point.
Look at subplot(211) in examples/subplot_demo.py. There a line is
plotted with one temporal resolution, and markers are placed along the
line at subsampled points. Basically two lines are added with
different sampling frequencies.
Does this suffice?
JDH
|