Code covered by the BSD License
-
demo_svg_water
Create a new figure and remember the figure handle
-
plot2svg.m
-
simulink2svg
Show the hidden handles to get access to the simulink figures
-
svgBoundingBox(s, type, overl...
Configures the bounding box of a SVG filter
-
svgComposite(s, source1, sour...
Adds a feComposite SVG filter
-
svgGaussianBlur(s, source, de...
Adds a feGaussianBlur SVG filter
-
svgImage(s, file, aspectRatio...
Adds a feImage SVG filter
-
svgLuminanceToAlpha(s, source...
Adds a feColorMatrix SVG filter that maps luminance to alpha values
-
svgOffset(s, source, offset, ...
Adds a feOffset SVG filter
-
svgSpecularLightingDistant(s,...
Adds a feSpecularLighting SVG filter with distant light source
-
svgTurbulence(s, frequency, o...
Adds a feTurbulence SVG filter
-
tutorial_filters
a) Original plot with a line, patch, and text object
-
tutorial_plot2svg.m
-
demo_3d_plot2svg.m
-
View all files
from
Scalable Vector Graphics (SVG) Export of Figures
by Juerg Schwizer
Converts 3D and 2D MATLAB plots to the scalable vector format (SVG).
|
| simulink2svg
|
function simulink2svg
% Show the hidden handles to get access to the simulink figures
set(0,'ShowHiddenHandles','on');
% Iterate over all children of the root
child = get(0,'children');
for i = 1:length(child)
% Pick all scope figures
if strcmp(get(child(i),'Tag'),'SIMULINK_SIMSCOPE_FIGURE')
% In order to get the correct background turn inverted background
% off. If you like a white background you should invert all labels
% and lines.
set(child(i),'InvertHardcopy','off');
% Use plot2svg
plot2svg(['Scope_' num2str(i) '.svg'], child(i))
set(0,'ShowHiddenHandles','off')
end
end
|
|
Contact us