Plot titles not centered when plot is exported as pdf in Linux version only
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Running Matlab in Linux (Mint 21.1 Cinnamon). I make a plot, I resize it on the screen, then I export it as a pdf using
exportgraphics(h,'test1_v7.pdf','ContentType','vector');
The title(s) above each plot are off-center in the pdf file. Always. 100% of the time. But they are perfect on the screen. Here's an example:
But it works fine in Matlab running in Windows 10.
I though it was related to OpenGL so I ran this line before plotting. Made no difference whatsoever.
set(0,'DefaultFigureRendererMode','manual')
The probem also occurs when exporting to eps format. It does not occur when exporting to png, tiff, or jpg. This leads me to believe it's related to vectorization. I would like to try it with svg, but the exportgraphics command cannot handle svg.
Any suggestions would be appreciated.
Edit: this problem extends to axis labels and legend entries also.
Note the whitespace padding in the x-axis label in image below. MATLAB figure on bottom, pdf export on top. Happens only in Linux version of MATLAB, pdf and eps exports only. Not in Windows version or in png, jpg, or tiff files.
Similar problem happens with legend entries. Upper legend is MATLAB figure, bottom is pdf export. Note erroneous whitespace padding in the pdf export. Happens only in Linux version of MATLAB, pdf and eps exports only. Not in Windows version or in png, jpg, or tiff files.
0 comentarios
Respuestas (1)
Angelo Yeo
el 19 de Jul. de 2023
If this is reproducible, it may be a bug. You can reach out to MathWorks Technical Support with reproduction steps.
Ver también
Categorías
Más información sobre Title en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!