[Matplotlib-users] patch and its border
ben.v.root at gmail.com
Tue Jun 7 10:57:52 EDT 2016
This actually intersects a bit with a need of mine in basemap. In basemap,
I need to find a clip path that is just slightly bigger than the bounding
box of the map limbs so that I am not "shaving" the border line for the map
limbs. I guess I could flip the problem around and have the map limbs drawn
"inside" the specified polygon so that I don't have to worry about the clip
path shaving my limbs (... yes, I know that sounds incredibly silly).
On Sun, Jun 5, 2016 at 9:22 PM, Thomas Caswell <tcaswell at gmail.com> wrote:
> I recall there being discussion of controlling if paths are stroked
> 'inside', 'outside', or 'on' the path, but I can not find a link.
> One possible work around (which is not super elegant) is to use two
> rectangles, one drawn with the thick border and one with a `lw=0` and a
> higher z-order overlayed on top.
> On Sun, Jun 5, 2016 at 6:36 PM Matěj Týč <matej.tyc at gmail.com> wrote:
>> consider a case when I want to draw a patch, but it is important how the
>> border is drawn. For example, if I have an aerial photo and I would like
>> to add a rectangle of given dimensions as a reference. Having the
>> rectangle interior white and its border thick and black is good, because
>> it ensures that the reference will be always clearly visible,
>> regardless of whether the photo is dark or bright.
>> However, as the border is thick, it may significantly overlap with the
>> interior, which is highly unwanted, because it will look smaller.
>> Therefore, in this case, I would like to draw the border, but all of it
>> should be outside of the patch primary area.
>> And I am sure that there are use cases for the opposite situation.
>> TL;DR: Take a look at the attached picture to see what I have in mind -
>> I would like to use "outer borders" (red) or "inner borders", or
>> classical ones, depending on my needs.
>> Is there a user possibility to influence how the border is drawn? If
>> not, how difficult would it be to implement this in matplotlib?
>> Matplotlib-users mailing list
>> Matplotlib-users at python.org
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users