Groups
Groups
Sign in
Groups
Groups
sage-devel
Conversations
About
Send feedback
Help
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-...@googlegroups.com
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
Plot of a function graph:
https://doc.sagemath.org/html/en/reference/plotting/sage/plot/plot.html
and source code:
https://github.com/sagemath/sage/blob/develop/src/sage/plot/plot.py
Dima Pasechnik
unread,
Sep 17, 2025, 12:35:06 PM (6 days ago)
Sep 17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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))
-------------------------
>
> Plot of a function graph:
>
https://doc.sagemath.org/html/en/reference/plotting/sage/plot/plot.html
> and source code:
>
https://github.com/sagemath/sage/blob/develop/src/sage/plot/plot.py
>
> --
> 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