help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Noise in vector graphics generated by pcolor


From: gdudziuk
Subject: Noise in vector graphics generated by pcolor
Date: Thu, 27 Feb 2014 01:33:32 -0800 (PST)

This post will be pretty long.
My problem is the following. I generate an .EPS graphic using Octave and it
looks fine. Next, I embed it in a LaTeX file, create a PDF. Then, it turns
out that my graphic has some noise, when viewed under Linux within the PDF
file.
Why I write about it here? Because it seems that it is Octave fault (or more
precisely - of pcolor function). I will explain it in more detail in a
moment.
First, let me say more on what I am doing and observing. I use *pcolor*
function to plot data contained in a matrix --- I call *pcolor(xx,yy,data)*,
where *xx* and *yy* contain the mesh coordinates and *data* contain the data
to be plotted. Next, I use various options to adjust the resulting figure:
*shading*, *colormap*, *caxis*, *axis*, *xlabel*, *ylabel*, title. The
argument for *shading* is *interp*. Ultimately, I save the result to file
using *print* function: *print -deps "-S400,400" -color file.eps*The
generated file looks nice. Below, a screenshot of the result is presented:
<http://octave.1599824.n4.nabble.com/file/n4662410/pcolor_img1.png> 
 Next, I use my graphic in a LaTeX document and, basing on this document,
generate a PDF. Then, I observe that my graphic, which look so nice in .eps
file, looks very noisy when embedded in the subject PDF. Below, I present a
screenshot of what I see in the PDF file, generated from LaTeX code:
<http://octave.1599824.n4.nabble.com/file/n4662410/pcolor_img2.png> 
All the above (the usage of Octave, of LaTeX and generation of PDF) was done
in Linux Ubuntu 12.04 LTS. Surprisingly, the noisy effect above occurs only
when viewing the PDF in Linux. When I view the obtained PDF in Windows 7, it
looks perfectly fine. Moreover, the noise observed in Linux disappear after
printing the document. Nevertheless, me and many of my colleagues  are using
Linux so it would be desired to have a document looking nice under Linux.
Now, I will explain why I think it is a problem with Octave (more precisely,
with *pcolor*).
1. I have tried to generate analogous images with MatLab and VisIt. The
resulting PDF did not contain noise, regardless on the operating system
(more precisely, the image from VisIt did not generate any noise when
embedded in PDF and the image from MatLab did generate acceptably low level
of noise). Nevertheless, I don't like the plot fonts offered by MatLab and
VisIt, so I prefer to use Octave. Conclusion: the observed noise is not the
fault of the operating system only.
2. I repeated the procedure (generating .eps in Octave, embedding it in
LaTeX code and generating PDF) in Windows 7. The result was the same. The
PDF file viewed in Windows was nice, but in Linux, a lot of noise appeared.
Conclusion: it is not the fault of LaTeX compiler.
3. So the reason is somewhere in Octave. Is it the fault of *pcolor* or of
*print* rather? This was easy to figure out. I tried other plotting
functions provided in Octave, like *contourf*, and repeated the procedure of
printing to file and generating a PDF from LaTeX code. No noise was
observed. So the reason is somewhere in *pcolor* function.
Any ideas why it happens? Any ideas how to fix it? It looks like the noise
is in fact a lot of very thin white lines, like e.g. vertical and horizontal
lines corresponding to the mesh coordinates (but this is only my
hypothesis). I have tried to remove the noise by manipulating the properties
of the surface graphics object generated by pcolor, but I haven't achieved
any positive result. But maybe playing with graphics object properties is a
good idea? Any ideas what exactly should be corrected in its properties?



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Noise-in-vector-graphics-generated-by-pcolor-tp4662410.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]