Antialiasing colorbars

Hi matplotlib users,

Is it possible to disable antialiasing for a colorbar? If not directly is it the possible to “postprocess” the axes instance to se antialiasing for relevant elements?

The reason I am asking is because I would like to produce a paletted png (using PIL) of the colorbar without the risk of removing any important colors in the process (in essence the output from matplotlib needs to have less than 256 colors for this to work).

Best regards,

Jesper

Hi matplotlib users,

Is it possible to disable antialiasing for a colorbar? If not directly
is it the possible to "postprocess" the axes instance to se antialiasing
for relevant elements?

The colorbar returns a Colorbar object, the "solids" attribute of which is a Quadmesh; so you should be able to execute

cbar.solids.set_antialiased(False)

to turn off antialiasing. With a bit of testing, however, I am not seeing any difference, so I'm not sure what is going on, and I don't have time now to investigate.

Eric

···

On 2014/09/30, 2:41 AM, Jesper Larsen wrote:

The reason I am asking is because I would like to produce a paletted png
(using PIL) of the colorbar without the risk of removing any important
colors in the process (in essence the output from matplotlib needs to
have less than 256 colors for this to work).

Best regards,
Jesper

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hi Eric

Thanks for your reply and sorry for my late response. Thanks for the pointer. I will try to investigate the issue myself.

Best regards,
Jesper

···

Den 30/09/2014 kl. 20.44 skrev Eric Firing <efiring@...202...>:

On 2014/09/30, 2:41 AM, Jesper Larsen wrote:
Hi matplotlib users,

Is it possible to disable antialiasing for a colorbar? If not directly
is it the possible to "postprocess" the axes instance to se antialiasing
for relevant elements?

The colorbar returns a Colorbar object, the "solids" attribute of which
is a Quadmesh; so you should be able to execute

cbar.solids.set_antialiased(False)

to turn off antialiasing. With a bit of testing, however, I am not
seeing any difference, so I'm not sure what is going on, and I don't
have time now to investigate.

Eric

The reason I am asking is because I would like to produce a paletted png
(using PIL) of the colorbar without the risk of removing any important
colors in the process (in essence the output from matplotlib needs to
have less than 256 colors for this to work).

Best regards,
Jesper

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options