added µ in plots disappear
TheInvisible84 opened this issue · 5 comments
imagesc(peaks); axis off equal; colormap hot; colorbar; hold on
sizex=90000; sizey=90000; nx=49; ny=49; pixelx=sizex/nx; pixely=sizey/ny;
if sizex> 30000
scalebar=10000;
SBname='10 µm';
elseif sizex> 15000
scalebar=5000;
SBname='5 µm';
elseif sizex> 3000
scalebar=1000;
SBname='1 µm';
elseif sizex<3000
scalebar=500;
SBname='500 nm';
end
SBx = [ nx-(nx*0.1)-(scalebar/pixelx) nx-(nx*0.1)-(scalebar/pixelx) nx-(nx*0.1);
nx-(nx*0.1) nx-(nx*0.1)-(scalebar/pixelx) nx-(nx*0.1)];
SBy = [ ny-(ny*0.1) ny-(ny*0.1)-(scalebar/pixelx*0.1) ny-(ny*0.1)+(scalebar/pixelx*0.1)
ny-(ny*0.1) ny-(ny*0.1)+(scalebar/pixelx*0.1) ny-(ny*0.1)-(scalebar/pixelx*0.1)];
plot(SBx,SBy,'LineWidth',3,'Color','w')
text((SBx(1,1)+SBx(2,1))/2,SBy(1,1)+(scalebar/pixelx*0.4),SBname,'Color','w','FontSize',24,'HorizontalAlignment','center')
plot2svg
By adding the µ in the scale the matlab figure looks as it is supposed to be but the exported figure has a large space between the 10 and the m instead of the µ
I can confirm this is an issue with the file encoding
the easiest you can do is to replace µ by \mu
, using tex format
this should fix the issue, please let me know...
By the way, when I use your file, the matlab figure that is generated doesn't show µ either, hence it's not a problem of plot2svg but a problem of matlab. I wanted to confirm if this is the same for you, and if so, I will close the issue as it's not plot2svg's fault, but matlab's.
The workaround I mentioned above should fix it anyway
haha right, that works, I could have guessed that.
Only in the matlab figure it has a different font but in the SVG it looks as it should!
Great