> On Thu, 4 Nov 2004, Cory Wolff wrote:
>
> > I am creating an ncgm file that contains 6 separate plots on the same
> > page. Each of these plots has it's own color map. The ncgm file looks
> > fine, all of the colors are how they are supposed to be. However, when I
> > use ctrans to convert it into sun format I get the following error:
> >
> > ctrans: WARNING - Error processing CGM element(class=4, id=9, name="Cell
> > Array") [ Background color changes ignored after drawing has begun ]
> >
> > The colors on the sun image are all messed up. It appears that each plot
> > has been given the color map of the last plot drawn. Does anyone have an
> > idea as to how to fix this?
> >
> > I would prefer to keep producing images in ncgm format because ctrans
> > (when it works) allows me to change the image resolution easily. I have
> > found that creating the image as a ps and using convert works fine, but I
> > cannot increase the image size. I have tried:
> >
> > convert -size 1200x1200 image.ps image.jpg
> >
> > But that does not work. Any help would be greatly appreciated. I can
> > also send some example plots to any interested parties. Thank you.
> >
> > Cory
Cory,
By definition, you can only have one color map per frame. If you need
different colormaps for each image on a page, then what I recommend is
setting up the color table for each one, and then using the
gsn_merge_colormaps to merge them into one colormap. This means that
the total sum of all your colormaps must not be more than 255 colors:
http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/appendixa.html#gsn_merge_colormaps
Once you do this, you will need to adjust your plot resources
accordingly so that they use the correct part of the merged colormap.
For example, if you have three filled contour plots, each with its own
16-color colormap that you've already merged into one single colormap,
then you might have something like this:
res1 = True
res1@gsnSpreadColors = True
res1@gsnSpreadColorStart = 2
res1@gsnSpreadColorEnd = 15
plot1 = gsn_csm_contour(wks,data1,res1)
res2 = True
res2@gsnSpreadColors = True
res2@gsnSpreadColorStart = 16
res2@gsnSpreadColorEnd = 31
plot2 = gsn_csm_contour(wks,data2,res2)
res3 = True
res3@gsnSpreadColors = True
res3@gsnSpreadColorStart = 32
res3@gsnSpreadColorEnd = 47
plot3 = gsn_csm_contour(wks,data3,res3)
You can also just use cnFillColors:
res1@cnFillColors = ispan( 2,15,1)
...
res2@cnFillColors = ispan(16,31,1)
...
res3@cnFillColors = ispan(32,47,1)
...
--Mary
_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Fri Nov 05 2004 - 15:31:19 MST