Thanks -- I was half-expecting Nathann to be the first to reply!  I
don't (or rather, did not)  know what D3 is...and I think I will wait
for someone else to do that for the LMFDB & isogeny graphs.  Meanwhile
it would still be nice to cut out the whitespace.

John

On 19 November 2015 at 12:19, William Stein <wst...@gmail.com> wrote:
> On Thu, Nov 19, 2015 at 8:55 AM, John Cremona <john.crem...@gmail.com> wrote:
>> I need to plot some graphs, save them and embed the results in a web
>> page, for example this:  http://www.lmfdb.org/EllipticCurve/Q/11/a/
>>
>> The graph itself is created from its adjacency matrix (with some
>> adjustment of the vertex positions to look good for some of the more
>> complicated examples).  But there is too much whitespace around the
>> resulting plot (which I go on to encode using
>> matplotlib.backends.backend_agg.FigureCanvasAgg).  Nothing I do seems
>> to get rid of it!
>>
>>
>> To test this, try
>>
>> sage: EllipticCurve('11a1').isogeny_graph().show()
>>
>>
>> Instead of a square box around this graph I would like a rectangle
>> which matches its shape without all the whitespace at the top and
>> bottom.  Not that other graphs have different shapes!  e.g.
>> EllipticCurve('15a1').isogeny_graph().show()
>
> Aside for the long run:  since you're presenting this information on
> the web, it would be way nicer to use D3.  E.g., like this:
>
> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-19-isogeny-cremona.sagews
>
> (this uses some code that Nathann Cohen sent me)
>
> Note that the renderer here evidently doesn't have edge labels implemented.
> But using D3 (or something built on it) is the future for showing
> "networks" in a webpage.  There's many javascript libraries that
> attempt to solve this problem these days.
>
>>
>> John
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-support@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> William (http://wstein.org)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to