#13430: log plots blank with points, but fine with lines
----------------------------+-----------------------------------------------
       Reporter:  jason     |         Owner:  jason, was
           Type:  defect    |        Status:  new       
       Priority:  major     |     Milestone:  sage-5.4  
      Component:  graphics  |    Resolution:            
       Keywords:            |   Work issues:            
Report Upstream:  N/A       |     Reviewers:            
        Authors:            |     Merged in:            
   Dependencies:            |      Stopgaps:            
----------------------------+-----------------------------------------------

Comment (by ppurka):

 About the second plot in comment:1 - this is fixed on adding #13528. Don't
 ask me why. `^_^`

 About the original question, the problem with the plot is that the point
 `x=0` is present in the plot. This is a documented fail situation - look
 at the doc `list_plot?` or `point2d?`, both of which mention that non-
 positive points should not be used in the log scale. This is the reason
 why `point` works with `semilogy` scale and not with `semilogx` or
 `loglog`.

 Instead, both these commands work:
 {{{
 sage: points(zip(*(range(1,len(ber)+1), ber))).show(scale='loglog')
 sage: points(zip(*(range(1,len(ber)+1), ber))).show(scale='semilogx')
 }}}

 If you want to use the `x=0` point, then use `list_plot` along with
 `plotjoined=True, linestyle='', marker='o'`:
 {{{
 sage: list_plot(list(enumerate(ber)), plotjoined=True, linestyle='',
 marker='o').show(scale='semilogx')
 sage: list_plot(list(enumerate(ber)), plotjoined=True, linestyle='',
 marker='o').show(scale='semilogy')
 sage: list_plot(list(enumerate(ber)), plotjoined=True, linestyle='',
 marker='o').show(scale='loglog')
 }}}
 This latter command runs through the `line` command in Sage, which uses
 the usual `plot` of matplotlib. `plotjoined=False` runs through the
 `point` command of Sage, which uses the `scatter` command of matplotlib.
 So, the failure of `x=0` in log scale is from the scatter command in
 matplotlib.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13430#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to