Quantcast

legend(loc='best') a bit off

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

legend(loc='best') a bit off

Neal Becker
In the attached, the legend box slightly covers the graph, but there is no
need to, it could just be moved a bit lower and then would cover nothing.

My questions:
1) can I fix it?
2) is this a bug?
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

saturated_ascma_paper_rot.pdf (40K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: legend(loc='best') a bit off

tcaswell

I am pretty sure that 'best' is picking from one of the 9 positions [(top, middle, bottom)X(left, center, right)] not picking a continuous position.

Fixing this would be useful and a pretty major new feature.  It is not clear to me what the best algorithm for this would be.  The obvious thing is to run N more refinements around each point, but hopefully there is some computational geometry that I do not know.

Tom


On Mon, Jan 9, 2017, 09:07 Neal Becker <[hidden email]> wrote:
In the attached, the legend box slightly covers the graph, but there is no
need to, it could just be moved a bit lower and then would cover nothing.

My questions:
1) can I fix it?
2) is this a bug?_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: legend(loc='best') a bit off

Phlya
Would an approach similar to adjustText be something you could consider for mpl? I was already thinking of adding this to the library.

9 Янв 2017 г. 15:15 пользователь "Thomas Caswell" <[hidden email]> написал:

I am pretty sure that 'best' is picking from one of the 9 positions [(top, middle, bottom)X(left, center, right)] not picking a continuous position.

Fixing this would be useful and a pretty major new feature.  It is not clear to me what the best algorithm for this would be.  The obvious thing is to run N more refinements around each point, but hopefully there is some computational geometry that I do not know.

Tom


On Mon, Jan 9, 2017, 09:07 Neal Becker <[hidden email]> wrote:
In the attached, the legend box slightly covers the graph, but there is no
need to, it could just be moved a bit lower and then would cover nothing.

My questions:
1) can I fix it?
2) is this a bug?_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: legend(loc='best') a bit off

tcaswell
In principle yes, but I think it would depend on how general / reliable the algorithm is vs how complex and invasive the algorithm ends up being.

Tom

On Mon, Jan 9, 2017 at 2:40 PM Ilya Flyamer <[hidden email]> wrote:
Would an approach similar to adjustText be something you could consider for mpl? I was already thinking of adding this to the library.

9 Янв 2017 г. 15:15 пользователь "Thomas Caswell" <[hidden email]> написал:

I am pretty sure that 'best' is picking from one of the 9 positions [(top, middle, bottom)X(left, center, right)] not picking a continuous position.

Fixing this would be useful and a pretty major new feature.  It is not clear to me what the best algorithm for this would be.  The obvious thing is to run N more refinements around each point, but hopefully there is some computational geometry that I do not know.

Tom


On Mon, Jan 9, 2017, 09:07 Neal Becker <[hidden email]> wrote:
In the attached, the legend box slightly covers the graph, but there is no
need to, it could just be moved a bit lower and then would cover nothing.

My questions:
1) can I fix it?
2) is this a bug?_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: legend(loc='best') a bit off

Phlya
OK, when I find the time to add it to adjustText, I'll get back to you to discuss this.

2017-01-10 18:22 GMT+00:00 Thomas Caswell <[hidden email]>:
In principle yes, but I think it would depend on how general / reliable the algorithm is vs how complex and invasive the algorithm ends up being.

Tom

On Mon, Jan 9, 2017 at 2:40 PM Ilya Flyamer <[hidden email]> wrote:
Would an approach similar to adjustText be something you could consider for mpl? I was already thinking of adding this to the library.

9 Янв 2017 г. 15:15 пользователь "Thomas Caswell" <[hidden email]> написал:

I am pretty sure that 'best' is picking from one of the 9 positions [(top, middle, bottom)X(left, center, right)] not picking a continuous position.

Fixing this would be useful and a pretty major new feature.  It is not clear to me what the best algorithm for this would be.  The obvious thing is to run N more refinements around each point, but hopefully there is some computational geometry that I do not know.

Tom


On Mon, Jan 9, 2017, 09:07 Neal Becker <[hidden email]> wrote:
In the attached, the legend box slightly covers the graph, but there is no
need to, it could just be moved a bit lower and then would cover nothing.

My questions:
1) can I fix it?
2) is this a bug?_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Loading...