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, o...Configures the bounding box of a SVG filter
- svgComposite(s, source1, ...Adds a feComposite SVG filter
- svgGaussianBlur(s, source...Adds a feGaussianBlur SVG filter
- svgImage(s, file, aspectR...Adds a feImage SVG filter
- svgLuminanceToAlpha(s, so...Adds a feColorMatrix SVG filter that maps luminance to alpha values
- svgOffset(s, source, offs...Adds a feOffset SVG filter
- svgSpecularLightingDistan...Adds a feSpecularLighting SVG filter with distant light source
- svgTurbulence(s, frequenc...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