Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #106242 > unrolled thread

A tool to add diagrams to sphinx docs

Started byGeorge Trojan - NOAA Federal <george.trojan@noaa.gov>
First post2016-04-01 15:59 +0000
Last post2016-04-01 19:14 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  A tool to add diagrams to sphinx docs George Trojan - NOAA Federal <george.trojan@noaa.gov> - 2016-04-01 15:59 +0000
    Re: A tool to add diagrams to sphinx docs Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2016-04-01 18:26 +0200
      RE: A tool to add diagrams to sphinx docs Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2016-04-01 19:14 +0000

#106242 — A tool to add diagrams to sphinx docs

FromGeorge Trojan - NOAA Federal <george.trojan@noaa.gov>
Date2016-04-01 15:59 +0000
SubjectA tool to add diagrams to sphinx docs
Message-ID<mailman.320.1459526353.28225.python-list@python.org>
What graphics editor would you recommend to create diagrams that can be
included in sphinx made documentation? In the past I used xfig, but was not
happy with font quality. My understanding is the diagrams would be saved in
a .png file and I should use an image directive in the relevant .rst file.

George

[toc] | [next] | [standalone]


#106243

FromIrmen de Jong <irmen.NOSPAM@xs4all.nl>
Date2016-04-01 18:26 +0200
Message-ID<56fea147$0$5832$e4fe514c@news.xs4all.nl>
In reply to#106242
On 1-4-2016 17:59, George Trojan - NOAA Federal wrote:
> What graphics editor would you recommend to create diagrams that can be
> included in sphinx made documentation? In the past I used xfig, but was not
> happy with font quality. My understanding is the diagrams would be saved in
> a .png file and I should use an image directive in the relevant .rst file.
> 
> George
> 

I've used .png successfully for a few images in my sphinx docs.
However if you're concerned with font quality, a better option is perhaps to use a
vector format like SVG instead. You can create them using a tool like Inkskape or
Illustrator. I haven't tried to use .svg in sphinx myself yet but I guess it simply
embeds/links it into the resulting html so a recent web browser should display them just
fine.

Irmen

[toc] | [prev] | [next] | [standalone]


#106247

FromAlbert-Jan Roskam <sjeik_appie@hotmail.com>
Date2016-04-01 19:14 +0000
Message-ID<mailman.323.1459538140.28225.python-list@python.org>
In reply to#106243

> Subject: Re: A tool to add diagrams to sphinx docs
> From: irmen.NOSPAM@xs4all.nl
> Date: Fri, 1 Apr 2016 18:26:48 +0200
> To: python-list@python.org
> 
> On 1-4-2016 17:59, George Trojan - NOAA Federal wrote:
> > What graphics editor would you recommend to create diagrams that can be
> > included in sphinx made documentation? In the past I used xfig, but was not
> > happy with font quality. My understanding is the diagrams would be saved in
> > a .png file and I should use an image directive in the relevant .rst file.
> > 
> > George
> > 
> 
> I've used .png successfully for a few images in my sphinx docs.
> However if you're concerned with font quality, a better option is perhaps to use a
> vector format like SVG instead. You can create them using a tool like Inkskape or
> Illustrator. I haven't tried to use .svg in sphinx myself yet but I guess it simply
> embeds/links it into the resulting html so a recent web browser should display them just
> fine.
I used .svg for dependency graphs made with snakefood. Looked good in html, though they essily get too detailed. The .rst:

.. figure:: images/my_image.svg    :width: 100% 		 	   		  

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web