Graph images in Sage Documentation

45 views
Skip to first unread message

Albert Yao

unread,
Sep 17, 2025, 1:08:45 AM (7 days ago) Sep 17
to sage-devel
Hi all,

Just wondering whether it's possible to show images of graph outputs in sage documentation. If so, how can I do it?

Many thanks,

Albert

Vincent Macri

unread,
Sep 17, 2025, 10:46:26 AM (7 days ago) Sep 17
to sage-...@googlegroups.com

Dima Pasechnik

unread,
Sep 17, 2025, 12:35:06 PM (6 days ago) Sep 17
to sage-...@googlegroups.com
On Wed, Sep 17, 2025 at 9:46 AM Vincent Macri <vincen...@ucalgary.ca> wrote:
>
> Yes, it is possible. Here are two examples depending on what kind of
> graph you're talking about.
>
> Graph theory graph:
> https://doc.sagemath.org/html/en/reference/graphs/sage/graphs/graph_plot.html
> and source code:
> https://github.com/sagemath/sage/blob/develop/src/sage/graphs/graph_plot.py

tl;dr

Add sphinx PLOT pieces, like
(note that the code inside them must be Python code, not Sage code)

------------------------

.. PLOT::

sphinx_plot(graphs.WheelGraph(15))

-------------------------
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/77d7b0be-c918-46ba-8b92-4f010cd0a050%40ucalgary.ca.
Reply all
Reply to author
Forward
0 new messages