#19485: Legible legends
-------------------------------------+-------------------------------------
Reporter: mjo | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: graphics | Resolution:
Keywords: beginner | Merged in:
Authors: Michael Orlitzky | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/mjo/ticket/19485 | 2148f20bedec3f4c7bac7f056bf5065b13f3ba8d
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by mjo):
Replying to [comment:2 kcrisman]:
> I don't really care ''that'' much, but I do think that the drop-shadow
maybe shouldn't be a default.
It feels a little weird "enabling" something by default, but what it came
down to for me is that it just looks better with the drop shadow than
without. I realized that I was thinking about making it look worse just so
a bit could be turned off.
> At least according to a lot of design stuff I read at some point about
the equivalent CSS thing in web pages.
Creating drop shadows with CSS was a nightmare for other reasons. The
standard way didn't work, and each browser had its own "beta"
implementation (none of which agreed), and as usual, nothing worked in
MSIE.
I do understand that adding bling bling should be done with care, but
hopefully people agree that the drop shadow is unobtrusive and creates a
nice contrast.
> Do you think a much lighter gray would work better? Maybe the white
might not distinguish enough between the stuff and the legend (sort of a
random box).
Yeah, that's why I enabled the drop shadow by default. Anything darker
than white makes the text harder to read, and "light gray" prints
terribly.
> otherwise you can just change YOUR defaults, if I recall correctly.
It's really hard! But that argument works against me if somebody really
likes the gray. This was the best I could come up with:
{{{
def mjo_plot(*args, **kwargs):
"""
Replacement for the default plot function.
- If there's a legend, set the background color to 'white' and
give it a drop shadow.
"""
default_legend_opts = { 'back_color': 'white',
'shadow': True }
p = plot_impl(*args, **kwargs)
p.set_legend_options(**default_legend_opts)
return p
sage.plot.plot._plot = mjo_plot
}}}
You need to do the same for `list_plot` and all of the graphics
primitives, too.
--
Ticket URL: <http://trac.sagemath.org/ticket/19485#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.