#16449: Add plot() and show() methods to abstract Matroid class
-------------------------------------+-------------------------------------
       Reporter:  Jayant             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  matroid theory     |   Resolution:
       Keywords:  visualization,     |    Merged in:
  geometric representation           |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  1a26f595814e3b7ef5b01c350858d78fd3dcf56b
  u/Jayant/ticket/16449              |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by Stefan):

 The white text labels are an unfortunate choice, as illustrated here:
 {{{
 M1 = Matroid(groundset=['Carolyn', 'Mike', 'Rudi', 'Stefan', 'Jayant',
 'Dillon', 'Hassler'], field=GF(2),
 reduced_matrix=[[1,1,0,1],[1,0,1,1],[0,1,1,1]])
 M2 = Matroid(groundset=range(200,207), field=GF(3),
 reduced_matrix=[[1,1,0,0],[1,0,1,0],[0,1,-1,0]])
 M1.show()
 M2.show()
 }}}
 The following results in an error:
 {{{
 M3 = matroids.Uniform(1,6)
 M3.show()
 }}}

 {{{
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "_sage_input_19.py", line 10, in <module>
     exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
 -*-\\n" +
 
_support_.preparse_worksheet_cell(base64.b64decode("TTMgPSBtYXRyb2lkcy5Vbmlmb3JtKDEsNikKTTMuc2hvdygp"),globals())+"\\n");
 execfile(os.path.abspath("___code___.py"))
   File "", line 1, in <module>

   File
 
"/private/var/folders/8p/gpt0bd4x5vg46bg2j4l0mnfr0000gn/T/tmppZYy7q/___code___.py",
 line 4, in <module>
     exec compile(u'M3.show()
   File "", line 1, in <module>

   File "matroid.pyx", line 4812, in sage.matroids.matroid.Matroid.show
 (sage/matroids/matroid.c:32349)
   File "matroid.pyx", line 4850, in sage.matroids.matroid.Matroid.show
 (sage/matroids/matroid.c:32173)
   File "matroid.pyx", line 4810, in sage.matroids.matroid.Matroid.plot
 (sage/matroids/matroid.c:31770)
   File "/Users/stefan/sage/local/lib/python2.7/site-
 packages/sage/matroids/matroids_plot_helpers.py", line 670, in geomrep
     G = addlp(M1,M,L,P,pts2,G)
   File "/Users/stefan/sage/local/lib/python2.7/site-
 packages/sage/matroids/matroids_plot_helpers.py", line 421, in addlp
     gnd = sorted(M1.groundset_list())
 AttributeError: 'MinorMatroid' object has no attribute 'groundset_list'
 }}}

 This should result in a "NotImplementedError", but doesn't do anything:
 {{{
 P8 = matroids.named_matroids.P8()
 P8.show()
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16449#comment:15>
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.

Reply via email to