-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digits Cut off In Axis Text #268
Comments
print(fig, '-loose', '-opengl', '-r864', '-depsc2', 'myfile.eps')
In any case, let me know what you find. |
Thanks for getting back to me. It doesn't crop when i use eps so I can look into the eps2pdf.m file. Do you have any clue which options I can try changing? |
Hello, I haven't had any luck with changing the options. When I open the pdf file with Inkscape it's clear this cropping is caused by these tiles: I've tried turning off all the elements of the figure that could be causing it (e.g. no grid, changing the background colour etc). Do you have any idea what it might be? It seems pretty integral though. |
The Inkscape image that you uploaded does not show any digit cropping (the "0" looks perfectly round in your image). I could also not see any significant cropping in my tests. So I'm thinking that perhaps the cropping is an artifact of your specific PDF viewer - try loading the PDF file in a different viewer and see if you still see a problem. If the problem is still there, then perhaps it is due to one of the Ghostscript options (Ghostscript is used to convert the intermediary EPS to PDF). This is done in line 143 of eps2pdf.m. I suggest that you take your EPS file (the one that you said looks good, and play with the Ghostscript options by removing them one by one and inspecting the output. For example, let's assume your EPS file is called "C:\test.eps". You could try the following in the Matlab Command Window: % Default options
options = '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile="C:\test1.pdf" -dEPSCrop -sFONTPATH="C:\Windows\Fonts" -f "C:\test.eps"';
ghostscript(options); winopen('C:\test1.pdf')
% remove the FONTPATH option and recheck:
options = '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile="C:\test2.pdf" -dEPSCrop -f "C:\test.eps"';
ghostscript(options); winopen('C:\test2.pdf')
% remove the EPSCrop option and recheck:
options = '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile="C:\test3.pdf" -sFONTPATH="C:\Windows\Fonts" -f "C:\test.eps"';
ghostscript(options); winopen('C:\test3.pdf') |
I'm trying to export PDF with OpenGL and transparency on and using Matlab R2018b. The text on left and right axes is being cut off, in particular zeros:
I've tried switching fonts, adding padding, turning off cropping, turning off font switching, but nothing helps. Painters and Zbuffer fixes the issue but I really need to use the transparency option.
I am using multiple subplots in this which might be the cause.
The text was updated successfully, but these errors were encountered: