Opened 11 years ago
Closed 11 years ago
#12929 closed enhancement (fixed)
Changing default color option for posets
Reported by: | Anne Schilling | Owned by: | Sage Combinat CC user |
---|---|---|---|
Priority: | minor | Milestone: | sage-5.1 |
Component: | combinatorics | Keywords: | poset, days38, plot, graphs |
Cc: | Sage Combinat CC user, Franco Saliola, Viviane Pons | Merged in: | sage-5.1.beta1 |
Authors: | Viviane Pons | Reviewers: | Franco Saliola |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The problem was that the posets appeared by default with a dark blue color on vertices which was not very pretty and made it difficult to read because the text was still in black.
Actually, the problem was coming from a little bug on Graph plot :
sage: G = Graph() sage: G.add_vertex(1) sage: G.plot() sage: G.plot(vertex_colors=None)
Giving "vertex_colors=None" didn't give the same result as not sending any vertex_colors. In the first case, the default behaviour of the graph plot (which gives some king of pale beige to the vertices) was not followed and for some reason the ugly blue appeared.
To fix it, I had to make a small change to the graph_plot.py in the way arguments were tested. It seems that all argument are tested the same way but I don't know if it is causing any trouble for other arguments so I only changed the "vertex_colors" test.
I didn't add any tests because I don't know how to test that the plot of a graph is done with blue or with some other color...
Attachments (1)
Change History (6)
comment:1 Changed 11 years ago by
Cc: | Franco Saliola Viviane Pons added |
---|---|
Description: | modified (diff) |
Keywords: | plot graphs added |
Status: | new → needs_review |
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Status: | needs_review → needs_work |
---|
Looks good to me. Patch applies, has the intended effect.
Small issue: the ticket number does not appear in the commit message.
Changed 11 years ago by
Attachment: | trac_12929_poset-default-color-vp.patch added |
---|
comment:4 Changed 11 years ago by
Status: | needs_work → positive_review |
---|
I just reposted the same patch with with the ticket number.
Positive review on behalf of Franco. Congrats Vivianne!
comment:5 Changed 11 years ago by
Merged in: | → sage-5.1.beta1 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
The patch is attached and is also on sage-combinat queue