Scalable Vector Graphics (SVG) Export of Figures
10 Apr 2005
17 Sep 2012)
Converts 3D and 2D MATLAB plots to the scalable vector format (SVG).
|svgBoundingBox(s, type, overlap, visible)
function svgBoundingBox(s, type, overlap, visible)
% Configures the bounding box of a SVG filter
% PRELIMINARY IMPLEMENTATION (Parameters may change)
% svgBoundingBox(s, type, overlap, visible)
% s : Array of plot object handles
% type : [axes, element, relative]
% Sets the filter bounding box to cover the axis reagion (axes), the
% element extension (element or relative). Axes gives usually the
% best results but may be slower.
% overlap : Many filters need an overlap to work correctly.
% Typical values for type 'axes' and 'element' -> 10
% Typical values for type 'relative' -> 0.1
% visible : Debugging functionality to see the bounding box used for an
for i = 1:length(s)
userdata = get(s(i),'UserData');
userdata.svg.BoundingBox.Visible = visible; % Useful for debugging of bounding box for filters
userdata.svg.BoundingBox.Type = type; % [axes, element, relative]
userdata.svg.BoundingBox.Overlap = overlap;