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:

Status badges

Description (last modified by Viviane Pons)

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 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)

trac_12929_poset-default-color-vp.patch (839 bytes) - added by Nicolas M. Thiéry 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by Viviane Pons

Cc: Franco Saliola Viviane Pons added
Description: modified (diff)
Keywords: plot graphs added
Status: newneeds_review

comment:2 Changed 11 years ago by Viviane Pons

The patch is attached and is also on sage-combinat queue

comment:3 Changed 11 years ago by Franco Saliola

Status: needs_reviewneeds_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 Nicolas M. Thiéry

comment:4 Changed 11 years ago by Nicolas M. Thiéry

Status: needs_workpositive_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 Jeroen Demeyer

Merged in: sage-5.1.beta1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.