#18612: Y-axis labels on matrix_plot are reversed.
----------------------------+------------------------
       Reporter:  deinst    |        Owner:
           Type:  defect    |       Status:  new
       Priority:  blocker   |    Milestone:  sage-6.8
      Component:  graphics  |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+------------------------

Comment (by kcrisman):

 {{{
 sage: p = 13; matrix_plot(matrix(p-1,[mod(a,p)^b for a in range(1,p) for b
 in srange(p)]),cmap='jet')
 Launched png viewer for Graphics object consisting of 1 graphics primitive
 }}}
 Looks great, but y-axis labels reversed (known bug from #18463).
 {{{
 sage: p = 13; matrix_plot(matrix(p-1,[mod(a,p)^b for a in range(1,p) for b
 in srange(p)]),cmap='jet', origin='lower')
 Launched png viewer for Graphics object consisting of 1 graphics primitive
 }}}
 Labels correct, but image upside-down.

 ----

 Could we just ("just") use
 [http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.yticks
 pyplot.yticks] to get the vertical ticks and then immediately reverse
 their order?  Or something like

 {{{
 sage: m.gca().get_yticks()
 array([ -2.,   0.,   2.,   4.,   6.,   8.,  10.,  12.])
 sage: m.gca().set_yticks(m.gca().get_yticks()[::-1])
 }}}
 I can't get this to quite work because I don't have the tkagg enabled for
 my Sage matplotlib, but inside of Sage something doing this should
 (hopefully) work.

 http://stackoverflow.com/questions/9382664/python-matplotlib-imshow-
 custom-tickmarks

 http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.get_yticks

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