SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Peter I. H. <pe...@gm...> - 2007年11月30日 15:46:47
Hi
I'm typestting some graphs including a few axvspan's with eg. a
facecolor='0.6' . This looks very nice if I output a PNG, but when I
inculde this in my TeX document the axis labels dosn't scale. Then I
try to go the postscript way, and the the labels scale nicely but the
colored fields of axvspan prints as a coarse raster color.
Is there a best way of optimizing print quality?
-Peter
From: Michael D. <md...@st...> - 2007年11月30日 15:59:28
Peter I. Hansen wrote:
> Hi
> 
> I'm typestting some graphs including a few axvspan's with eg. a
> facecolor='0.6' . This looks very nice if I output a PNG, but when I
> inculde this in my TeX document the axis labels dosn't scale. Then I
> try to go the postscript way, and the the labels scale nicely but the
> colored fields of axvspan prints as a coarse raster color.
I assume you mean that the axvspan prints as a solid color, rather than 
semi-transparent (alpha-blended). That is an unfortunate limitation of 
the Postscript format -- it can not handle transparency.
> Is there a best way of optimizing print quality?
Each of the output formats has a number of different limitations -- it 
depends a lot on what you're rendering and where you need it to go.
You could try saving as a PDF, and then using pdftex to generate your 
document, if that's an option for you.
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Peter I. H. <pe...@gm...> - 2007年11月30日 16:05:30
On Nov 30, 2007 4:58 PM, Michael Droettboom <md...@st...> wrote:
> Peter I. Hansen wrote:
> > Hi
> >
> > I'm typestting some graphs including a few axvspan's with eg. a
> > facecolor='0.6' . This looks very nice if I output a PNG, but when I
> > inculde this in my TeX document the axis labels dosn't scale. Then I
> > try to go the postscript way, and the the labels scale nicely but the
> > colored fields of axvspan prints as a coarse raster color.
>
> I assume you mean that the axvspan prints as a solid color, rather than
> semi-transparent (alpha-blended). That is an unfortunate limitation of
> the Postscript format -- it can not handle transparency.
Yes, I'm using a solid color.
> > Is there a best way of optimizing print quality?
>
> Each of the output formats has a number of different limitations -- it
> depends a lot on what you're rendering and where you need it to go.
>
> You could try saving as a PDF, and then using pdftex to generate your
> document, if that's an option for you.
Unfortunately, saving directly as PDF does not work on my (Debian)
system. It gives a "NotImplementedError". I'm using version 0.90.1,
and maybe this will change for 0.91 .
From: Michael D. <md...@st...> - 2007年11月30日 17:25:28
Peter I. Hansen wrote:
> On Nov 30, 2007 4:58 PM, Michael Droettboom <md...@st...> wrote:
>> Peter I. Hansen wrote:
>>> Hi
>>>
>>> I'm typestting some graphs including a few axvspan's with eg. a
>>> facecolor='0.6' . This looks very nice if I output a PNG, but when I
>>> inculde this in my TeX document the axis labels dosn't scale. Then I
>>> try to go the postscript way, and the the labels scale nicely but the
>>> colored fields of axvspan prints as a coarse raster color.
>> I assume you mean that the axvspan prints as a solid color, rather than
>> semi-transparent (alpha-blended). That is an unfortunate limitation of
>> the Postscript format -- it can not handle transparency.
> 
> Yes, I'm using a solid color.
> 
>>> Is there a best way of optimizing print quality?
>> Each of the output formats has a number of different limitations -- it
>> depends a lot on what you're rendering and where you need it to go.
>>
>> You could try saving as a PDF, and then using pdftex to generate your
>> document, if that's an option for you.
> 
> Unfortunately, saving directly as PDF does not work on my (Debian)
> system. It gives a "NotImplementedError". I'm using version 0.90.1,
> and maybe this will change for 0.91 .
Can you please send the full traceback that accompanies this error? PDF 
should be working is general, but perhaps you are running into a 
specific feature of the PDF backend that is not working, and there may 
be a workaround (or 0.91 may work)...
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Michael D. <md...@st...> - 2007年12月03日 13:05:42
Peter I. Hansen wrote:
> On Nov 30, 2007 11:14 PM, Michael Droettboom <md...@st...> wrote:
>> Thanks for the script. I ran it through 0.90 and 0.91... Perhaps I
>> don't understand your problem with color. To my eyes, the plot
>> generated with Agg (to a PNG) and to a PDF look the same, in terms of
>> the color of the axvspans.
>>
>> So, either your mpl installation is generating a different PDF than mine
>> (certainly possible), or I'm just not seeing the difference that is
>> bothering you (also possible). It could be that you are using a
>> different PDF viewer (I'm using Adobe Acrobat Reader 7.0 on Linux...)
>>
>> I've attached the PDF I get from 0.90 on my machine. Does it look the
>> same as yours?
[This attachment was too large for the list and bounced... I'm bringing 
the conversation back to the list.]
> Your output looks similar to mine. The thing that bothers me (and I
> see that maybe I wasn't clear enough on that to begin with) is the
> grainy way the colors look when printed.
That may be beyond matplotlib's control. Matplotlib "requests" a solid 
grey color, but the printing stack (Acrobat, the printer driver or the 
printer itself) could be interpreting that in many ways. You could 
experiment with various printer settings.
Sorry to not have a more helpful answer. Perhaps others on this list 
have suggestions.
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Rich S. <rsh...@ap...> - 2007年12月03日 14:06:56
On Mon, 3 Dec 2007, Michael Droettboom wrote:
> That may be beyond matplotlib's control. Matplotlib "requests" a solid
> grey color, but the printing stack (Acrobat, the printer driver or the
> printer itself) could be interpreting that in many ways. You could
> experiment with various printer settings.
>
> Sorry to not have a more helpful answer. Perhaps others on this list
> have suggestions.
 Don't know if this is pertinent to this thread, but I see differences when
viewing LaTeX documents such as an OMR (Optical Mark Reader) form I designed
when viewed as PostScript and as PDF. The former displays the graphics
better than does the latter while the latter better displays the text. In my
case, the printed version combines the highest quality of the two.
Rich
-- 
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /