2012/7/18 Francesco Montesano <franz.berges...@gmail.com>:
> 2012/7/18 Jonathan Slavin <jsla...@cfa.harvard.edu>:
>> Ben,
>>
>> Yes, you're right, but I doubt any solution that involves mimicking an
>> alpha channel will work for one case that I've been using.  That is,
>> making the legend box partially transparent.  I use that to allow the
>> box to fit in the plot without blocking the data and without the need to
>> make the upper y limit too large.
> My solution would probably work if you could, pixel by pixel (or patch
> by patch), mimic alpha in each layer using as background the resulting
> color of the previous layer.
>
> Do anyone know if it is possible to implement something like this in
> matplotlib when saving a eps or in a backend?
>
>>
>> I don't notice any problems with blockiness in the text or lines in the
>> raster image.  I'll find out soon if the editors of the Astrophysical
>> Journal are okay with the figures.
> I guess that you produce the figures roughly of the right size (about
> 8 or 16 cms wide for single or double column figures)  and then
> convert. So probably you see that the figure is a raster if you zoom
> in.
>
> Fra
>
>>
>> Jon
>>
>> On Tue, 2012-07-17 at 15:34 -0500, Benjamin Root wrote:
>>>
>>>
>>> On Tue, Jul 17, 2012 at 3:01 PM, Jonathan Slavin
>>> <jsla...@cfa.harvard.edu> wrote:
>>>         Francesco,
>>>
>>>         While I like your solution, there is an alternative that is
>>>         simpler and
>>>         works for me.  That is 1) save matplotlib plot as a png, 2)
>>>         convert to
>>>         eps using either ImageMagick or GraphicsMagick.  You do end up
>>>         with
>>>         relatively large files, but they look identical to the
>>>         original plots.
>>>
>>>         Regards,
>>>         Jon
>>>
>>> No, it is not the same thing.  Text in a vector-based format such as
>>> eps is scalable.  ImageMagick and GraphicsMagick are inherently
>>> raster-based, and before that, PNGs are raster-based.  Therefore, the
>>> text is not scaled and anti-aliased according to the display size.
>>>
>>> I will be looking over the proposed solution this evening.
>>>
>>> Cheers!
>>> Ben Root
>>>
>>>

Dear matplotlibers,
I've uploaded a new version which accepts also lists/tuple/numpy
arrays of colors and/or alphas and returns a list of RGB colors.
https://github.com/montefra/mimic_alpha
https://github.com/montefra/mimic_alpha/downloads

Cheers,
Francesco

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to