Image quality degrades when using incrementally bigger mesh
1 view (last 30 days)
Show older comments
I am trying to make an image containing multiple plots (I'm using subplot). One of the plots is a mesh(). Then I use print() to make an EPS file.
When I make the arrays inputted into mesh 90x337 everything looks fine. But when I make them 90x338, everything messes up...quality is degraded, e.g., tick labels are no longer arbitrarily smooth as I zoom in (as vector graphics should)...if I use Latex as the interpreter, suddenly some letters in axis labels become subscripts...everything looks grainy. The threshold is even worse for the Figure plot than for the exported image file.
I don't think this is a filetype issue (raster vs. vector) as the same problem seems to occur for TIFFs and PNGs. I have tried specifying use of Painters. I have tried deleting large arrays right before calling mesh() to try to free up memory but that doesn't solve it. I've tried "opengl neverselect."
When I don't plot the mesh but I continue to make my other lineplots etc. in the figure, all is well...the issue appears to be related to the amount of data being plotted by mesh().
I have tried all the basic things I believe and am a pretty experienced MATLAB user, but I am going nuts. I'm using Fedora Linux...I have a feeling this wouldn't happen in e.g. Windows.
BTW, I definitely need much higher mesh resolution than 90x337 because I am plotting spectra with particular linewidths and spacings. And even if I didn't care about that I need higher resolution simply to increase the image quality (this is for a publication, hopefully).
Any help would be incredibly appreciated. Thanks in advance!
--Andrew
0 Comments
Accepted Answer
Image Analyst
on 8 Apr 2013
Sounds like an aliasing issue to me. Why not make them all a lot bigger like 4 times as big, and put them into your paper/document separately instead of using subplot?
More Answers (1)
Image Analyst
on 8 Apr 2013
Try asking Malcom Lidierth about Project Waterloo: http://www.mathworks.com/matlabcentral/answers/56890-publication-quality-graphics-in-matlab
3 Comments
Malcolm Lidierth
on 11 Apr 2013
@Andrew
It sounds to me that this is a problem with the software you are using to process/view the MATLAB eps output. Try viewing the eps file from MATAB in a decent previewer/print it at different sizes). Examine the file content. Is it vector output?MATLAB might switch to embedding an image with multiple axes I guess but I am not aware of any docs on that.
As IA says, it looks like aliasing (with height 337 vs 338 making a difference -odd vs even- that suggests some pretty basic resampling algorithms are being applied). Is your post-MATLAB processing converting EPS to bitmap?
ML
See Also
Categories
Find more on Red in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!