![]() I must have done this incorrectly, because, while the first solution at least draws something, this draws nothing at all - but no errors are given. Line = 2D(,, color='w', transform=trans) The second solution would mean replacing the last line with those below (always within the for loop): trans = _transform_factory(fig.transFigure, a.transAxes) # this is the first solution messy output, line behind other elements of the figureĪ.plot(,, color='black', lw=0.5, transform=a.transAxes, clip_on=False) def init(self, title, varieties, datapoints, attrs, animFalse, datafuncNone, isheadlessFalse): global animfunc plt.close() self.legend 'Type' self.title title self.anim anim self.datafunc datafunc for i in varieties: datapoints len(varietiesi 'data') break self.headless isheadless self.drawgraph(datapoint. The second solution given at that link uses blended_transform_factory, but, to be honest, I couldn't get the syntax to work. The line end ups beneath the other elements of the.determining the exact coordinates where to plot it, exactly how much below, is cumbersome, as that depends on what elements are present in the figure: titles,.drawing it from (0,0) to (1,0) draws it at the bottom of the axis I need it farther below, below the x_axis label etc.Plotting a line using the plot() method of each axis, and using transform=ansAxes, so that (0,0) is the bottom left and (1,1) is the top right does draw a line, but: I (sort of) understand these transformations, but the fundamental question I have, which would clarify everything else, is: is there a way to identify the "real" bottom left of each subplot as the (0,0) point of some transformation? Or, once you start adding titles, labels, etc, can these items mes up the coordinate system, eg an axis label may end up with y coordinates < 0? I am well aware of this question, but I couldn't get the solution given there to work, as I explain below. ![]() ![]() I want to draw a line or some kind of separator between subplots. Matplotlib can display plot titles centered, flush with the left side of a set of axes, and flush with the right side of a set of axes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |