Unfortunately, I don't think there is a way to do this at present. Out of curiosity, what is the use case?
I wonder if the best way to do this would be to expose the stroking to the Python level, so given a line one could get a filled path that is the stroked line. I'm not sure how else this could work, since the zooming could be different in each direction, etc., or could even by log-scaled etc. Would you mind creating an issue ticket for this? (Patches welcome, too, of course, and I can provide pointers if you want to take this on yourself...) Mike On 04/12/2013 05:34 AM, Michael Wimmer wrote: > I have a collection of Patches and Lines that have their coordinates in > data space, i.e. like in the following example: > > > import matplotlib.pyplot as plt > import matplotlib.patches as mpatches > import matplotlib.collections as mcollections > import matplotlib.lines as mlines > > fig = plt.figure() > ax = fig.add_subplot(111) > > patches = [] > patches.append(mlines.Line2D((0,1),(0,1), linewidth=1)) > patches.append(mpatches.Circle((0,0), 0.25, linewidth=1)) > patches.append(mpatches.Circle((1,1), 0.25, linewidth=1)) > > coll = mcollections.PatchCollection(patches) > ax.add_collection(coll) > ax.autoscale_view() > > plt.show() > > > Now, in this example the line width is always given with respect to the > screen space, i.e. does not change when I zoom into the plot. Is it > possible to specify a linewidth with respect to data space? I.e. to say > that a line (in both the Line2D and the Circle) should be let's say 0.1 > in data space, and thus scale accordingly if I zoom in? > > -Michael > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users