colorbar problem in 2014b when printing pdf

4 vues (au cours des 30 derniers jours)
Michael
Michael le 26 Nov 2014
Commenté : Leo OfNature le 18 Mar 2019
When I make a colorbar and print as pdf, it has an artifact that looks like a white dashed line. I think it is where two parts of the colorbar image meet. Any ideas for a work around?
colorbar
print('-dpdf','test.pdf')
  2 commentaires
Chad Greene
Chad Greene le 26 Nov 2014
Interesting. I get the same result.
Christopher Benwell
Christopher Benwell le 19 Oct 2016
I also have this problem. Has anyone found a workaround for it? It is quite incredible how often Mathworks manage to introduce new problems with their updates.

Connectez-vous pour commenter.

Réponses (3)

Jan
Jan le 28 Déc 2014
Modifié(e) : Jan le 28 Déc 2014
Is this a problem of Matlab or does it depend on the PDF viewer? See http://www.mathworks.com/matlabcentral/answers/15388-artifacts-in-figures-exported-as-pdf-from-matlab .
  3 commentaires
Travis
Travis le 8 Jan 2015
Beautiful!!! First time I have found someone actually point the way to the fix. Thank you.
Leo OfNature
Leo OfNature le 18 Mar 2019
Modifié(e) : Leo OfNature le 18 Mar 2019
Sorry, but fixing the pdf viewer is not a satisfactory answer, given that that most pdf viewer are configured by default to make this deffect appears... WRONG answer!

Connectez-vous pour commenter.


Bing Yuan
Bing Yuan le 31 Mai 2016
In matlab2016, adding the following line removes the dashed line in the colorbar, although the size of the output file changes:
set(gcf, 'Renderer', 'opengl') % remove grids for contourf and the dashed line in colorbar when saving pdf/eps. in matlab2016a.
It might also work for matlab2014b.
  2 commentaires
Michael
Michael le 31 Mai 2016
I can confirm that the default pdf created in 2015a still has the artifact and that using the OpenGL renderer removes it. Using the OpenGL renderer also means you get a bitmap embedded in a pdf, so poorer quality.
Leo OfNature
Leo OfNature le 18 Mar 2019
Yes, but the quality get so poor that it doesn't worth anymore to export as a vecrorized graphics...

Connectez-vous pour commenter.


Michael Tippett
Michael Tippett le 22 Sep 2016
And I've confirmed that Matlab 2016a still has the artifact if vector graphics are used (no embedded bitmap). Sad.

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by