#14782: empty ticks result in empty axes in log scale
-------------------------------------+-------------------------------------
       Reporter:  ppurka             |        Owner:  jason, was
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  graphics           |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Punarbasu          |    Reviewers:
  Purkayastha                        |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  a4e6c88c8218545d7b1be8970d83e3c38687435d
  u/ppurka/ticket/14782              |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ppurka):

 Here is a "minimal" (really???!!!) code to reproduce it in matplotlib
 {{{
 from matplotlib.figure import Figure
 from matplotlib.ticker import NullLocator
 from matplotlib.backends.backend_agg import FigureCanvasAgg
 import matplotlib.lines as lines
 figure=Figure()
 subplot = figure.add_subplot(111)
 subplot.add_line(lines.Line2D(range(10), range(10)))

 subplot.spines['right'].set_visible(False)
 subplot.spines['left'].set_position(('outward',10))
 subplot.spines['top'].set_visible(False)
 subplot.spines['bottom'].set_position(('outward',10))

 subplot.xaxis.set_major_locator(NullLocator())
 subplot.yaxis.set_major_locator(NullLocator())

 figure.set_canvas(FigureCanvasAgg(figure))
 figure.savefig('a.png', bbox_inches='tight', bbox_extra_artists=[])
 }}}

 Things which bring back the axes:
 1. Set the `outward` parameter a bit less
 {{{
 subplot.spines['bottom'].set_position(('outward',7)) # just barely
 subplot.spines['left'].set_position(('outward',7))
 }}}
 2. Either remove `bbox_inches='tight'` or `bbox_extra_artists=[]` from the
 `savefig` command.

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