#13732: Fix output of real data in matplotlib PDF backend
------------------------------------------------+---------------------------
       Reporter:  john_perry                    |         Owner:  jason, was  
           Type:  defect                        |        Status:  needs_review
       Priority:  trivial                       |     Milestone:  sage-5.7    
      Component:  graphics                      |    Resolution:              
       Keywords:  PDF, matplotlib, save, alpha  |   Work issues:              
Report Upstream:  N/A                           |     Reviewers:              
        Authors:                                |     Merged in:              
   Dependencies:                                |      Stopgaps:              
------------------------------------------------+---------------------------

Old description:

> We want to fix the following error on sage 5.4. Given the input
>
> {{{
> sage: p = disk((0,0), 5, (0, pi/4), color='red')
> sage: p += disk((0,0), 5, (pi/4, pi/2), color='red', alpha=0.5)
> sage: p.save("test.pdf")
>
> }}}
> we get the error
>
> {{{
> TypeError: Don't know a PDF representation for <type
> 'sage.rings.real_mpfr.RealLiteral'> objects.
>
> }}}
> This can be fixed in the backend quite easily.

New description:

 We want to fix the following error on sage 5.4. Given the input

 {{{
 sage: p = disk((0,0), 5, (0, pi/4), color='red')
 sage: p += disk((0,0), 5, (pi/4, pi/2), color='red', alpha=0.5)
 sage: p.save("test.pdf")

 }}}
 we get the error

 {{{
 TypeError: Don't know a PDF representation for <type
 'sage.rings.real_mpfr.RealLiteral'> objects.

 }}}
 This can be fixed in the backend quite easily.

 '''Apply:'''

  1. [attachment:trac_13732.patch]

--

Comment (by john_perry):

 '''NEEDS REVIEW'''

 It looks like you forgot to change the status to "needs work", so I will
 leave it as "needs review" ;-)

 It turns out that '''all''' the other files I had worked on were okay.
 That gave me the idea to look at how `arc()` handles the same problems,
 since it also accepts the `alpha` keyword. By mimicking that solution
 (which also showed me why the coordinates don't raise the same error), I
 avoided the whole `!= None` problem.

 To be honest, it looks as if someone either noticed this problem before &
 tried to fix it, remembering everything except `disk()`. Here I was
 thinking I was making a great contribution, when in fact I was just
 cleaning up behind someone else. I'll go weep into some hot tea. ;-)

 By the way, I hope you're not too snowed in, way up there in New England.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13732#comment:4>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to