transparent background in contour map

From: Ruben van Hooidonk <rubski_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 19 2013 - 11:16:31 MDT

Hi,

I'm trying to plot a map where all locations without values (_FillValue)
are transparent. I'm having trouble setting the background color to
transparent.

I'm using NCL 6.1.2 and I have tried using cellfill and setting:
mpres@cnMissingValFillColor = "transparent", but then the missing locations
are plotted using the background color.

I've tried to set the background color to transparent by defining my own
colormap:

 colors = (/"transparent","black","White","RoyalBlue","LightSkyBlue"/)
 gsn_define_colormap(wks, colors)

That resulted in:
warning:CvtStringGenArrayToCmap:Unable to find rgb of "transparent", using
white

or by setting wks values:
setvalues wks
      "wkBackgroundColor" : "transparent"
      "wkForegroundColor" : "black"
    end setvalue

This resulted in:
fatal:NhlCvtStringGenArrayToFloatGenArray:Unable to Convert "transparent"
warning:Error retrieving resource wkBackgroundColor from args - Ignoring Arg

Is it possible to plot locations with missing data as transparent?

Would this work with rasterfill?

Thanks,

Ruben

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 19 11:16:52 2013

This archive was generated by hypermail 2.1.8 : Tue Mar 19 2013 - 16:31:18 MDT