svg_fix_viewbox(in_​name,varargin)

Make SVG file stretch with containing HTML element

Sie verfolgen jetzt diese Einreichung

Since R2014b, MATLAB can directly output graphics as SVG files (print -dpng). The generated figure has a fixed size. If you want to include this SVG on your website, you might want it to stretch to the width of the containing HTML element. This function edits the SVG file generated by MATLAB to do just this.
The function also fixes the fonts used: the default figure font is exported as 'SansSerif', which is not recognized by my browser (and I presume many others). The correct CSS name is 'sans-serif'. The function replaces all occurrences of the former with the latter.

Zitieren als

Cris Luengo (2026). svg_fix_viewbox(in_name,varargin) (https://de.mathworks.com/matlabcentral/fileexchange/49617-svg_fix_viewbox-in_name-varargin), MATLAB Central File Exchange. Abgerufen .

Kategorien

Mehr zu MATLAB Report Generator finden Sie in Help Center und MATLAB Answers

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.0.0.0