How to suppress specific warning?

I get the following warning when plotting two surfaces with different colors but only showing one colorbar, which is what I want:

ā”Œ Warning: Multiple series with different fill alpha share a colorbar. Colorbar may not reflect all series correctly.

But how do I remove this annoying warning message which is kept on being generated for each call to the plotting function.

Kind regards

This seems to be a desirable warning, but only issued by the gr() backend.

You could try Suppressor.jl.

When you are plotting two surfaces on top of each other, to see where they overlap visually, it is quite annoying to have this warning pop up multiple times. That is why I would like to suppress it, because as an user, I took the decision to only show one colorbar. It ruins the interactivity of my work when logs in terminal is shown with these messages in between and I actually care about other errors - just not this one.

@mike_k Thanks, but it seems like it has not been updated for 2 years. I would like to avoid relying on such a package - there must be away to do what I want.

EDIT: Sorry if I sound mad, that is not my intention :slight_smile:

Kind regards

Maybe you could consider using another Plots.jl backend if this is so critical. Checked pyplot() and it seems to be fine.

NB: had to guess from your other posts that you are only using gr(), and then tagged this one accordingly.

1 Like

Yeah sorry, forgot to mention - thanks though!

I will write a issue on the Github of gr.

Kind regards

https://github.com/jheinen/GR.jl/issues/433