I'm using matplotlib to generate svg plots which I'm putting into an html
document. I noticed the plots aren't scaling the way I expect them to with
css in an html page, so, a little yak-shaving later, I found a particular
line in the source code that I think should change (or be changeable with
an option).

Basically, the svg backend specifies a width and height in pixels. If I
edit the svg file to set width and height to "100%", the figure scales with
css the way I expect.

Is there some way to do this without patching matplotlib (or editing every
generated svg by hand)? I'm attaching the one-line patch to make the svg
backend do what I want, but if someone wants the old behavior, perhaps
there could be a configuration option in matplotlib.rcParams?

    Vadim


-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Attachment: svg_patch
Description: Binary data

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to