Re: [galaxy-dev] Plotting tools - best output format? PDF, PNG, ... SVG!

2011-04-21 Thread Peter Cock
On Thu, Apr 21, 2011 at 10:50 AM, Pieter Neerincx
pieter.neeri...@gmail.com wrote:
 Hi Peter,

 On Apr 20, 2011, at 5:47 PM, Peter Cock wrote:

 On Wed, Apr 20, 2011 at 4:30 PM, Pieter Neerincx
 pieter.neeri...@gmail.com wrote:
 Hi Peter,

 On Apr 20, 2011, at 11:07 AM, Peter Cock wrote:

 Hi all,

 ...cut...

 How about SVG? Don't most of the mainline browsers have
 reasonably good SVG support built in (possibly via a plugin)?

 Yep, SVG support is pretty good nowadays especially in FireFox
 and Opera. Safari, IE and Chrome have only partial support, but
 for simple charts without 3D filters it works fine. I've added SVG
 as a datatype to my Galaxy and this works great. You won't need
 a plugin; in fact the old Adobe SVG plugin is depreciated already
 for a few years now and no longer compatible with recent browser
 versions.

 I looked at SVG about a year ago, and was pretty impressed.
 I did run into some issues, particularly with links, and opted to
 use PNG files in the end. Since then we've finally dropped IE6,
 so hopefully SVG would be safe now.

 Are your changes to add SVG as a datatype to Galaxy public?
 I'd like to suggest that be merged to the trunk.

 I simply added this line to my datatypes_conf.xml:

        datatype extension=svg type=galaxy.datatypes.images:Image 
 mimetype=image/svg+xml/

 I didn't make a sniffer as I don't have a use case for users
 uploading SVGs, so I didn't have to create a Python class and
 SVG is just another instance of galaxy.datatypes.images:Image
 from a plain vanilla Galaxy.

That makes sense if the sniffer is only used on upload.

 To make sure the client displays the SVG you may have to add
 the SVG mimetype to your web server's config too. Where this
 is defined may differ per linux distro. I use apache as a proxy
 and had to add

        image/svg+xml           svg svgz

 to /etc/mime.types.

Thanks for the details - it looks simple enough to add here too.
If/when any SVG producing tools are added to Galaxy or the
Galaxy Tool Shed, then it would be nice to have this done in
the main repository.

 The nice benefit of SVG in addition to not needing a plugin is
 that the image can scale with the surrounding text if you zoom
 in your browser (without loosing resolution).

 The disadvantage is that although my users know what a PDF
 file is and can process them for posters/manuscripts, most of
 them never heard of SVG and get stuck when it doesn't import
 into PowerPoint et al. :(

 Do they cope with PDF?

 Well, they know how to view and print one :). Importing them
 directly into PowerPoint and Word is just as problematic though,
 so that usually involves opening the PDF in a different program
 and copy/paste or exporting to another format. Still a hassle, but
 they manage...

Getting a PDF into PowerPoint or Word is easy on a Mac ;)
But yes, point taken - even though a PDF is easier to work with
than an SVG (or a postscript file), it can still be a hassle.

Peter

___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] Plotting tools - best output format? PDF, PNG, ... SVG!

2011-04-20 Thread Peter Cock
On Wed, Apr 20, 2011 at 4:30 PM, Pieter Neerincx
pieter.neeri...@gmail.com wrote:
 Hi Peter,

 On Apr 20, 2011, at 11:07 AM, Peter Cock wrote:

 Hi all,

 ...cut...

 How about SVG? Don't most of the mainline browsers have
 reasonably good SVG support built in (possibly via a plugin)?

 Yep, SVG support is pretty good nowadays especially in FireFox
 and Opera. Safari, IE and Chrome have only partial support, but
 for simple charts without 3D filters it works fine. I've added SVG
 as a datatype to my Galaxy and this works great. You won't need
 a plugin; in fact the old Adobe SVG plugin is depreciated already
 for a few years now and no longer compatible with recent browser
 versions.

I looked at SVG about a year ago, and was pretty impressed.
I did run into some issues, particularly with links, and opted to
use PNG files in the end. Since then we've finally dropped IE6,
so hopefully SVG would be safe now.

Are your changes to add SVG as a datatype to Galaxy public?
I'd like to suggest that be merged to the trunk.

 The nice benefit of SVG in addition to not needing a plugin is
 that the image can scale with the surrounding text if you zoom
 in your browser (without loosing resolution).

 The disadvantage is that although my users know what a PDF
 file is and can process them for posters/manuscripts, most of
 them never heard of SVG and get stuck when it doesn't import
 into PowerPoint et al. :(

Do they cope with PDF?

Peter
___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/