Alteration of figure while saving
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I constructed a graph with matlab and saved it as a .pdf file. However, I notice the pdf graph is missing elements that are present on the matlab output.
Here is the Matlab output
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/560138/image.png)
Here is the pdf output.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/560143/image.png)
Here is my saving code.
h=gcf;
set(h,'PaperPositionMode','auto');
set(h,'PaperOrientation','landscape');
set(h,'Position',[50 50 1200 800]);
print(gcf, '-dpdf', 'Mypdf.pdf')
Can someone help ? I want my pdf graph to be exactly the Matlab output.
2 Kommentare
Walter Roberson
am 24 Mär. 2021
Would it be acceptable to make your ylim lower bound slightly negative, so that the dots were not exactly on the boundary?
I suspect that you are encountering depth considerations, which of the two left axes is on top of the other -- but it would not be surprising for pdf's idea of clipping to be just slightly different than MATLAB's.
Antworten (1)
Walter Roberson
am 28 Mär. 2021
Summary from above:
making the ylim slightly lower helped, as then there was no conflict between the point markers and the line for the border.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!