diff --git a/example/demo_3d_plot2svg.m b/example/demo_3d_plot2svg.m
index 6d080f0..f06fb2c 100644
--- a/example/demo_3d_plot2svg.m
+++ b/example/demo_3d_plot2svg.m
@@ -1,3 +1,5 @@
+%% 3D sphere with alpha data
+clear all;
figure
[x y z] = sphere(20);
s = surface(x,y,z,'facecolor','interp','cdata',z);
@@ -12,3 +14,38 @@
zlabel('Z');
title('Sphere with Alpha Data');
plot2svg('sphere.svg');
+
+%% Rescaling patches to avoid gaps
+clear all;
+
+x = -3.5:0.1:3.5;
+y = -3.5:0.1:3.5;
+
+[X, Y] = meshgrid(x, y);
+
+Z = peaks(X, Y);
+
+figure(1);
+clf;
+surf(X, Y, Z);
+axis tight;
+xlabel('x');
+ylabel('y');
+zlabel('z');
+shading flat;
+view([20, 80]);
+
+% When exporting 3D plots with flat shading (no mesh lines around the
+% patches) some viewers show small gaps between the patches. This can even
+% lead to a mind of "semi transparent" appearance with many small patches,
+% because the background can be seen in the gaps.
+setting.svg.PatchRescale = 1; % This is the deault setting.
+set(gcf, 'UserData', setting);
+plot2svg('flat_default.svg');
+
+% A simple solution to this problem is to tell plot2svg to slightly
+% increase the patch size, such that the patches overlap. A rescaling value
+% of 105% is usually a good value to start with.
+setting.svg.PatchRescale = 1.05;
+set(gcf, 'UserData', setting);
+plot2svg('flat_rescaled.svg');
diff --git a/example/demo_misc.m b/example/demo_misc.m
new file mode 100644
index 0000000..41476f1
--- /dev/null
+++ b/example/demo_misc.m
@@ -0,0 +1,89 @@
+%% Image overlay and typical usage.
+% The purpose of the OverlayImage function is to replace parts of a figure,
+% e.g., a rendering which is too complex to be stored as vector graphics,
+% with a bitmap image. The bitmap file is linked and not embedded in the SVG.
+
+clear all;
+
+% First, render the 3D graphics into a bitmap file.
+x = -3.5:0.1:3.5;
+y = -3.5:0.1:3.5;
+
+[X, Y] = meshgrid(x, y);
+
+Z = peaks(X, Y);
+
+figure(1);
+clf;
+surf(X, Y, Z);
+axis tight;
+xlabel('x');
+ylabel('y');
+zlabel('z');
+shading interp;
+lighting('phong');
+camlight('headlight');
+colormap(jet(512));
+axis off;
+xl = xlim();
+yl = ylim();
+zl = zlim();
+
+bg = get(gcf, 'color');
+% Make sure the background color is saved, so that we can set it transparent
+% later.
+set(gcf, 'InvertHardCopy', 'off');
+
+print -dpng -r300 'render.png'
+
+% Load and re-save the image with transparent background.
+% Be careful that the background color doesn't occur in your plot. If this
+% is the case you should set another background color above.
+A = imread('render.png');
+imwrite(A, 'render_t.png', 'png', 'transparency', bg);
+
+% Now recreate the same axis without the data.
+% Please note:
+% In some cases it can be difficult to achieve a correct alignment of the
+% bitmap and vector output. It may require some fiddling and your mileage
+% may vary.
+figure(2);
+clf;
+surf([0, 0;0, 0], [0, 0;0, 0], [0, 0;0, 0]);
+axis tight;
+xlabel('x');
+ylabel('y');
+zlabel('z');
+xlim(xl);
+ylim(yl);
+zlim(zl);
+
+% Last step: Store axis plot as SVG image and use the rendered data as
+% overlay.
+setting.svg.OverlayImage = 'render_t.png';
+setting.svg.OverlayImagePos = [0, 0, 1, 1];
+set(gcf, 'UserData', setting);
+
+plot2svg('overlay.svg');
+
+%% Simple use case:
+% Of course, you can use the overlay function to just add a bitmap to your
+% SVG file.
+clear all;
+
+x = 0:0.1:5;
+y = 1 + x.^2;
+
+figure(3);
+clf;
+
+plot(x, y);
+xlabel('x values');
+ylabel('y values');
+
+setting.svg.OverlayImage = 'water_stones.jpg';
+setting.svg.OverlayImagePos = [0.2, 0.2, 0.25, 0.25];
+set(gcf, 'UserData', setting);
+
+plot2svg('overlay_simple.svg');
+
diff --git a/example/inkscape_latex/inkscape_demo.tex b/example/inkscape_latex/inkscape_demo.tex
new file mode 100644
index 0000000..c545448
--- /dev/null
+++ b/example/inkscape_latex/inkscape_demo.tex
@@ -0,0 +1,28 @@
+\documentclass[a4paper]{article}
+\usepackage{graphicx}
+%\usepackage{showframe}
+\usepackage{geometry}
+\usepackage{color}
+\usepackage{subfig}
+
+\geometry{a4paper, portrait, left=1.5cm, right=1.5cm, top=1.5cm, bottom=1.5cm, includefoot, includehead}
+
+\newcommand{\includesvg}[1]{\input{#1.pdf_tex}}
+\newcommand{\includesvgfn}[1]{\footnotesize\input{#1.pdf_tex}}
+
+\begin{document}
+\pagestyle{empty}
+\begin{figure}
+ \centering
+ \includesvg{demo_graphics}
+ \caption{Demo for including graphics using \texttt{plot2svg} and \texttt{inkscape}.}
+\end{figure}
+
+\begin{figure}
+ \centering
+ \hfill\subfloat[Smaller graphics with default font size.]{\includesvg{demo_graphics_smaller}}\hfill\hfill
+ \subfloat[Smaller graphics with smaller font size.]{\includesvgfn{demo_graphics_smaller}}\hspace*{\fill}
+ \caption{Since all \LaTeX{} code is overlaid during the document compile pass, the font size can be set in the main document.}
+\end{figure}
+
+\end{document}
diff --git a/example/inkscape_latex/tutorial_inkscape.m b/example/inkscape_latex/tutorial_inkscape.m
new file mode 100644
index 0000000..0711f6a
--- /dev/null
+++ b/example/inkscape_latex/tutorial_inkscape.m
@@ -0,0 +1,48 @@
+clear all;
+%%
+
+% Generate a nice plot.
+dt = 0.01;
+tend = 10;
+t = 0:dt:tend;
+
+y = sin(2*pi*t);
+
+figure(1);
+clf;
+plot(t, y);
+grid on;
+axis tight;
+xlabel('$t$ / s');
+ylabel('$y$ / V');
+set(gca, 'XScale', 'log');
+
+text(0.02, -0.25, '\LaTeX{} test $\frac{a}{b}$');
+legend('$\sin(2\pi t)$');
+
+% We want to use the LaTeX + PDF export capability of Inkscape. Therefore,
+% we have to make sure that plot2svg preserves all our LaTeX strings.
+% This can be achieved by setting the option LatexPassOn to true.
+setting.svg.LatexPassOn = true;
+set(gcf, 'UserData', setting);
+
+plot2svg('demo_graphics.svg');
+
+% Call Inkscape to convert the SVG file to a PDF and a LaTeX overlay file.
+% Note: This works only if the path to the Inkscape executable is correctly
+% set up. Alternatively you could do this manually in Inkscape.
+system('inkscape -z --export-area-page --file=demo_graphics.svg --export-pdf=demo_graphics.pdf --export-latex');
+
+%%
+% Sometimes, we want the graphics to be smaller. There are multiple ways to
+% achieve this. If we want to scale everything, including the line widths,
+% the GlobalSize option can be used.
+setting.svg.GlobalScale = 0.6;
+set(gcf, 'UserData', setting);
+plot2svg('demo_graphics_smaller.svg');
+system('inkscape -z --export-area-page --file=demo_graphics_smaller.svg --export-pdf=demo_graphics_smaller.pdf --export-latex');
+
+%%
+% Call pdflatex to compile the document. Again, this only works if the
+% path to pdflatex is set up.
+system('pdflatex inkscape_demo.tex');
diff --git a/src/plot2svg.m b/src/plot2svg.m
index ca885ec..6d2aa6d 100644
--- a/src/plot2svg.m
+++ b/src/plot2svg.m
@@ -29,7 +29,7 @@
% Clipping
% Minor tick marks
% 22.01.2005 - Removed unused 'end'
-% 29.10.2006 - Bugfix '°','±','µ','²','³','¼''½','¾','©''®'
+% 29.10.2006 - Bugfix '','','','','','''','',''''
% 17-04-2007 - Bugfix 'projection' in hggroup and hgtransform
% 27-01-2008 - Added Octave functionality (thanks to Jakob Malm)
% Bugfixe cdatamapping (thanks to Tom)
@@ -90,8 +90,8 @@
% - Tiny optimization of the grid display at axis borders
% 25-08-2011 - Fix for degree character (thanks to Manes Recheis)
% - Fix for problems with dash-arrays in Inkscape (thanks to
-% Rüdiger Stirnberg)
-% - Modified shape of driangles (thanks to Rüdiger Stirnberg)
+% Rdiger Stirnberg)
+% - Modified shape of driangles (thanks to Rdiger Stirnberg)
% 22-10-2011 - Removed versn as return value of function fileparts (thanks
% to Andrew Scott)
% - Fix for images (thanks to Roeland)
@@ -146,6 +146,21 @@
% 14-05-2015 - Reverted part of the text rendering of 19-02-2015 as it
% failed to handle exponents.
% 14-05-2015 - Removed undefined variable which was obsolete
+% Edit by Thomas Wiesner
+% 04-07-2015 - Merge of LatexPassOn option.
+% 04-07-2015 - Merge of GlobalScale option.
+% 04-07-2015 - Merge of overlay image function.
+% A pixel image can now be placed on top of the plot using
+% OverlayImage. This is useful, if you want to export some
+% parts of the plot as pixel data (e.g. for 3D surface plots
+% which can be extremely time consuming to export as vector
+% graphics.)
+% The relative position of the overlay image must be set with
+% OverlayImagePos = [x, y, width, height].
+% 04-07-2015 - Merged support for rescaling of patches with PatchRescale
+% (gouraud not supported, yet). This is necessary, to create
+% overlap of patches in 3D plots, because some viewers show
+% white gaps if the patches don't overlap.
@@ -154,6 +169,11 @@
progversion='14-May-2015';
PLOT2SVG_globals.runningIdNumber = 0;
PLOT2SVG_globals.octave = false;
+PLOT2SVG_globals.LatexPassOn = false;
+PLOT2SVG_globals.GlobalScale = 1;
+PLOT2SVG_globals.OverlayImage = '';
+PLOT2SVG_globals.OverlayImagePos = [0, 0, 1, 1];
+PLOT2SVG_globals.PatchRescale = 1;
PLOT2SVG_globals.checkUserData = true;
PLOT2SVG_globals.ScreenPixelsPerInch = 90; % Default 90ppi
try
@@ -245,6 +265,33 @@
colorname(i,:)=sprintf('%02x%02x%02x',fix(cmap(i,1)*255),fix(cmap(i,2)*255),fix(cmap(i,3)*255));
end
+if PLOT2SVG_globals.checkUserData && isstruct(get(id,'UserData'))
+ struct_data = get(id,'UserData');
+ if isfield(struct_data,'svg')
+ if isfield(struct_data.svg,'LatexPassOn')
+ PLOT2SVG_globals.LatexPassOn = struct_data.svg.LatexPassOn;
+ end
+ if isfield(struct_data.svg,'GlobalScale')
+ PLOT2SVG_globals.GlobalScale = struct_data.svg.GlobalScale;
+ end
+ if isfield(struct_data.svg,'OverlayImage')
+ PLOT2SVG_globals.OverlayImage = struct_data.svg.OverlayImage;
+
+ if ~isfield(struct_data.svg,'OverlayImagePos')
+ disp(' Warning: OverlayImage option and no OverlayImagePos given.');
+ disp(' Image will be scaled across whole plot.');
+ end
+ end
+ if isfield(struct_data.svg,'OverlayImagePos')
+ PLOT2SVG_globals.OverlayImagePos = struct_data.svg.OverlayImagePos;
+ end
+ if isfield(struct_data.svg,'PatchRescale')
+ PLOT2SVG_globals.PatchRescale = struct_data.svg.PatchRescale;
+ end
+ end
+end
+
+
% Open SVG-file
[pathstr,name] = fileparts(finalname);
%PLOT2SVG_globals.basefilename = fullfile(pathstr,name);
@@ -253,13 +300,17 @@
PLOT2SVG_globals.figurenumber = 1;
fid=fopen(finalname,'wt'); % Create a new text file
fprintf(fid,'\n'); % Insert file header
-fprintf(fid,'\n');
fclose(fid); % close text file
@@ -2285,6 +2340,8 @@ function minorGridLines(fid, grouplabel, axpos, x, y, scolorname, minor_gridline
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% create a patch (filled area)
function patch2svg(fid,group,axpos,xtot,ytot,scolorname,style,width, edgecolorname, face_opacity, edge_opacity, closed)
+global PLOT2SVG_globals
+
if closed
type = 'polygon';
else
@@ -2301,6 +2358,24 @@ function patch2svg(fid,group,axpos,xtot,ytot,scolorname,style,width, edgecolorna
for j = 1:20000:length(x)
xx = x(j:min(length(x), j + 19999));
yy = y(j:min(length(y), j + 19999));
+
+ % Scale patch around its center point.
+ % Calculate center point
+ cx = mean(xx);
+ cy = mean(yy);
+
+ % Move to origin
+ xx = xx - cx;
+ yy = yy - cy;
+
+ % Scale up
+ xx = xx*PLOT2SVG_globals.PatchRescale;
+ yy = yy*PLOT2SVG_globals.PatchRescale;
+
+ % Move back to position
+ xx = xx + cx;
+ yy = yy + cy;
+
if ~strcmp(edgecolorname,'none') || ~strcmp(scolorname,'none')
fprintf(fid,' <%s fill="%s" fill-opacity="%0.2f" stroke="%s" stroke-width="%0.1fpt" stroke-opacity="%0.2f" %s points="',...
type, scolorname, face_opacity, edgecolorname, width, edge_opacity, pattern);
@@ -2319,6 +2394,24 @@ function patch2svg(fid,group,axpos,xtot,ytot,scolorname,style,width, edgecolorna
for j = 1:(length(parts) - 1)
xx = x((parts(j)+1):(parts(j+1)-1));
yy = y((parts(j)+1):(parts(j+1)-1));
+
+ % Scale patch around its center point.
+ % Calculate center point
+ cx = mean(xx);
+ cy = mean(yy);
+
+ % Move to origin
+ xx = xx - cx;
+ yy = yy - cy;
+
+ % Scale up
+ xx = xx*PLOT2SVG_globals.PatchRescale;
+ yy = yy*PLOT2SVG_globals.PatchRescale;
+
+ % Move back to position
+ xx = xx + cx;
+ yy = yy + cy;
+
if ~strcmp(edgecolorname,'none') || ~strcmp(scolorname,'none')
if ~isempty(xx)
fprintf(fid,' <%s fill="%s" fill-opacity="%0.2f" stroke="%s" stroke-width="%0.1fpt" stroke-opacity="%0.2f" %s points="',...
@@ -2611,7 +2704,11 @@ function exponent2svg(fid,group,axpos,paperpos,ax,axxtick,axytick,axztick)
ratio = 1;
end
if round(log10(ratio(1))) ~= 0 && ratio(1) ~= 0
- exptext = sprintf('× 10%g', -log10(ratio(1)));
+ if ~PLOT2SVG_globals.LatexPassOn
+ exptext = sprintf('× 10%g', -log10(ratio(1)));
+ else
+ exptext = sprintf('$\\times 10^{%g}$',-log10(ratio(1)));
+ end
label2svg(fid,group,axpos,ax,(axpos(1)+axpos(3))*paperpos(3),(1-axpos(2))*paperpos(4)+3*fontsize,exptext,'right',0,'top',1,paperpos,font_color,0)
end
end
@@ -2643,7 +2740,11 @@ function exponent2svg(fid,group,axpos,paperpos,ax,axxtick,axytick,axztick)
ratio = 1;
end
if round(log10(ratio(1))) ~= 0 && ratio(1) ~= 0
- exptext = sprintf('× 10%g', -log10(ratio(1)));
+ if ~PLOT2SVG_globals.LatexPassOn
+ exptext = sprintf('× 10%g', -log10(ratio(1)));
+ else
+ exptext = sprintf('$\\times 10^{%g}$',-log10(ratio(1)));
+ end
label2svg(fid,group,axpos,ax,axpos(1)*paperpos(3),(1-(axpos(2)+axpos(4)))*paperpos(4)-0.5*fontsize,exptext,'left',0,'bottom',1,paperpos,font_color,0)
end
end
@@ -2675,7 +2776,11 @@ function exponent2svg(fid,group,axpos,paperpos,ax,axxtick,axytick,axztick)
ratio = 1;
end
if round(log10(ratio(1))) ~= 0 && ratio(1) ~= 0
- exptext = sprintf('× 10%g', -log10(ratio(1)));
+ if ~PLOT2SVG_globals.LatexPassOn
+ exptext = sprintf('× 10%g', -log10(ratio(1)));
+ else
+ exptext = sprintf('$\\times 10^{%g}$',-log10(ratio(1)));
+ end
label2svg(fid,group,axpos,ax,axpos(1)*paperpos(3),(1-(axpos(2)+axpos(4)))*paperpos(4)-0.5*fontsize,exptext,'left',0,'top',1,paperpos,font_color,0)
end
end
@@ -2687,6 +2792,8 @@ function exponent2svg(fid,group,axpos,paperpos,ax,axxtick,axytick,axztick)
% former versions of FrameMaker supported the commands FDY and FDX to shift the text
% this commands were replaced by a shift parameter that is normed by the font size
function label2svg(fid,group,axpos,id,x,y,tex,align,angle,valign,lines,paperpos,font_color,exponent)
+global PLOT2SVG_globals
+
if isempty(tex)
return;
end
@@ -2707,6 +2814,9 @@ function label2svg(fid,group,axpos,id,x,y,tex,align,angle,valign,lines,paperpos,
else
latex=1;
end
+if PLOT2SVG_globals.LatexPassOn
+ latex = 0;
+end
fontsize=convertunit(get(id,'FontSize'),get(id,'FontUnits'),'points', axpos(4)); % convert fontsize to inches
fontweight = get(id,'FontWeight');
switch lower(fontweight)
@@ -2866,8 +2976,12 @@ function label2svg(fid,group,axpos,id,x,y,tex,align,angle,valign,lines,paperpos,
return;
end
if exponent
- tex=sprintf('10%s', 0.7*textfontsize, -0.7*textfontsize, tex);
- shift = shift + 0.4*fontsize; % Small correction to make it look nicer
+ if ~PLOT2SVG_globals.LatexPassOn
+ tex = sprintf('10%s', 0.7*textfontsize, -0.7*textfontsize, tex);
+ shift = shift + 0.4*fontsize; % Small correction to make it look nicer
+ else
+ tex = sprintf('$10^{%s}$', tex);
+ end
end
% Note: Obviously, Matlab is using font sizes that are rounded to decimal
% pt sizes. This may cause problems for very small figures. But we have to
@@ -3065,83 +3179,83 @@ function label2svg(fid,group,axpos,id,x,y,tex,align,angle,valign,lines,paperpos,
StringText=strrep(StringText,'>','>');
StringText=strrep(StringText,'"','"');
% Workaround for Firefox and Inkscape
- StringText=strrep(StringText,'°','°');
- %StringText=strrep(StringText,'°','°');
- StringText=strrep(StringText,'±','±');
- StringText=strrep(StringText,'µ','µ');
- StringText=strrep(StringText,'²','²');
- StringText=strrep(StringText,'³','³');
- StringText=strrep(StringText,'¼','¼');
- StringText=strrep(StringText,'½','½');
- StringText=strrep(StringText,'¾','¾');
- StringText=strrep(StringText,'©','©');
- StringText=strrep(StringText,'®','®');
+ StringText=strrep(StringText,'','°');
+ %StringText=strrep(StringText,'','°');
+ StringText=strrep(StringText,'','±');
+ StringText=strrep(StringText,'','µ');
+ StringText=strrep(StringText,'','²');
+ StringText=strrep(StringText,'','³');
+ StringText=strrep(StringText,'','¼');
+ StringText=strrep(StringText,'','½');
+ StringText=strrep(StringText,'','¾');
+ StringText=strrep(StringText,'','©');
+ StringText=strrep(StringText,'','®');
if any(StringText > 190)
- StringText=strrep(StringText,'¿','¿');
- StringText=strrep(StringText,'À','À');
- StringText=strrep(StringText,'Á','Á');
- StringText=strrep(StringText,'Â','Â');
- StringText=strrep(StringText,'Ã','Ã');
- StringText=strrep(StringText,'Ä','Ä');
- StringText=strrep(StringText,'Å','Å');
- StringText=strrep(StringText,'Æ','Æ');
- StringText=strrep(StringText,'Ç','Ç');
- StringText=strrep(StringText,'È','È');
- StringText=strrep(StringText,'É','É');
- StringText=strrep(StringText,'Ê','Ê');
- StringText=strrep(StringText,'Ë','Ë');
- StringText=strrep(StringText,'Ì','Ì');
- StringText=strrep(StringText,'Í','Í');
- StringText=strrep(StringText,'Î','Î');
- StringText=strrep(StringText,'Ï','Ï');
- StringText=strrep(StringText,'Ð','Ð');
- StringText=strrep(StringText,'Ñ','Ñ');
- StringText=strrep(StringText,'Ò','Ò');
- StringText=strrep(StringText,'Ó','Ó');
- StringText=strrep(StringText,'Ô','Ô');
- StringText=strrep(StringText,'Õ','Õ');
- StringText=strrep(StringText,'Ö','Ö');
- StringText=strrep(StringText,'×','×');
- StringText=strrep(StringText,'Ø','Ø');
- StringText=strrep(StringText,'Ù','Ù');
- StringText=strrep(StringText,'Ú','Ú');
- StringText=strrep(StringText,'Û','Û');
- StringText=strrep(StringText,'Ü','Ü');
- StringText=strrep(StringText,'Ý','Ý');
- StringText=strrep(StringText,'Þ','Þ');
- StringText=strrep(StringText,'ß','ß');
- StringText=strrep(StringText,'à','à');
- StringText=strrep(StringText,'á','á');
- StringText=strrep(StringText,'â','â');
- StringText=strrep(StringText,'ã','ã');
- StringText=strrep(StringText,'ä','ä');
- StringText=strrep(StringText,'å','å');
- StringText=strrep(StringText,'æ','æ');
- StringText=strrep(StringText,'ç','ç');
- StringText=strrep(StringText,'è','è');
- StringText=strrep(StringText,'é','é');
- StringText=strrep(StringText,'ê','ê');
- StringText=strrep(StringText,'ë','ë');
- StringText=strrep(StringText,'ì','ì');
- StringText=strrep(StringText,'í','í');
- StringText=strrep(StringText,'î','î');
- StringText=strrep(StringText,'ï','ï');
- StringText=strrep(StringText,'ð','ð');
- StringText=strrep(StringText,'ñ','ñ');
- StringText=strrep(StringText,'ò','ò');
- StringText=strrep(StringText,'ó','ó');
- StringText=strrep(StringText,'ô','ô');
- StringText=strrep(StringText,'õ','õ');
- StringText=strrep(StringText,'ö','ö');
- StringText=strrep(StringText,'÷','÷');
- StringText=strrep(StringText,'ø','ø');
- StringText=strrep(StringText,'ù','ù');
- StringText=strrep(StringText,'ú','ú');
- StringText=strrep(StringText,'û','û');
- StringText=strrep(StringText,'ü','ü');
- StringText=strrep(StringText,'ý','ý');
- StringText=strrep(StringText,'þ','þ');
- StringText=strrep(StringText,'ÿ','ÿ');
+ StringText=strrep(StringText,'','¿');
+ StringText=strrep(StringText,'','À');
+ StringText=strrep(StringText,'','Á');
+ StringText=strrep(StringText,'','Â');
+ StringText=strrep(StringText,'','Ã');
+ StringText=strrep(StringText,'','Ä');
+ StringText=strrep(StringText,'','Å');
+ StringText=strrep(StringText,'','Æ');
+ StringText=strrep(StringText,'','Ç');
+ StringText=strrep(StringText,'','È');
+ StringText=strrep(StringText,'','É');
+ StringText=strrep(StringText,'','Ê');
+ StringText=strrep(StringText,'','Ë');
+ StringText=strrep(StringText,'','Ì');
+ StringText=strrep(StringText,'','Í');
+ StringText=strrep(StringText,'','Î');
+ StringText=strrep(StringText,'','Ï');
+ StringText=strrep(StringText,'','Ð');
+ StringText=strrep(StringText,'','Ñ');
+ StringText=strrep(StringText,'','Ò');
+ StringText=strrep(StringText,'','Ó');
+ StringText=strrep(StringText,'','Ô');
+ StringText=strrep(StringText,'','Õ');
+ StringText=strrep(StringText,'','Ö');
+ StringText=strrep(StringText,'','×');
+ StringText=strrep(StringText,'','Ø');
+ StringText=strrep(StringText,'','Ù');
+ StringText=strrep(StringText,'','Ú');
+ StringText=strrep(StringText,'','Û');
+ StringText=strrep(StringText,'','Ü');
+ StringText=strrep(StringText,'','Ý');
+ StringText=strrep(StringText,'','Þ');
+ StringText=strrep(StringText,'','ß');
+ StringText=strrep(StringText,'','à');
+ StringText=strrep(StringText,'','á');
+ StringText=strrep(StringText,'','â');
+ StringText=strrep(StringText,'','ã');
+ StringText=strrep(StringText,'','ä');
+ StringText=strrep(StringText,'','å');
+ StringText=strrep(StringText,'','æ');
+ StringText=strrep(StringText,'','ç');
+ StringText=strrep(StringText,'','è');
+ StringText=strrep(StringText,'','é');
+ StringText=strrep(StringText,'','ê');
+ StringText=strrep(StringText,'','ë');
+ StringText=strrep(StringText,'','ì');
+ StringText=strrep(StringText,'','í');
+ StringText=strrep(StringText,'','î');
+ StringText=strrep(StringText,'','ï');
+ StringText=strrep(StringText,'','ð');
+ StringText=strrep(StringText,'','ñ');
+ StringText=strrep(StringText,'','ò');
+ StringText=strrep(StringText,'','ó');
+ StringText=strrep(StringText,'','ô');
+ StringText=strrep(StringText,'','õ');
+ StringText=strrep(StringText,'','ö');
+ StringText=strrep(StringText,'','÷');
+ StringText=strrep(StringText,'','ø');
+ StringText=strrep(StringText,'','ù');
+ StringText=strrep(StringText,'','ú');
+ StringText=strrep(StringText,'','û');
+ StringText=strrep(StringText,'','ü');
+ StringText=strrep(StringText,'','ý');
+ StringText=strrep(StringText,'','þ');
+ StringText=strrep(StringText,'','ÿ');
end
StringText=deblank(StringText);
end
@@ -3381,4 +3495,4 @@ function label2svg(fid,group,axpos,id,x,y,tex,align,angle,valign,lines,paperpos,
zlims = lims;
end
end
- end
\ No newline at end of file
+ end