From: Alan W. I. <ir...@be...> - 2002-07-10 16:58:57
|
On Wed, 10 Jul 2002, [iso-8859-1] Jo=E3o Cardoso wrote: > the xfig file format stores colors at a fixed position (variable length) > in the begining of the file; latter changes in the colors will thus > overwrite the previous color setting, thus the observed results. Thanks for investigating this case. However, I don't see how the position of where the colours are stored in the file matters so long as you are allowed to add to the colours part way through a plot, and I assume your variable length remark means you can do that for the xfig format. Of course this is not a trivial fix. What you have to do is to have an additional mapping step to get from the PLplot colours to the xfig ones. T= o take the cmap0 example a step further for the first sub-plot there are 16 PLplot colours which should be mapped to 16 xfig colours. However, when the first colour index for PLplot cmap0 is changed from red to white for the remaining sub-plots then there should be an additional 17th white colour defined in the xfig system which the first cmap0 index for PLplot now maps to. But the red colour is still in the xfig colour map so the first sub-plot with red box and scales should remain unaffected. > > I think the same happens for any file based format, and can't be fixed. No, I don't believe you can generalize this way. There is no such problem with the postscript format. Furthermore, I believe the idea of having a transformation between the PLplot colour maps and the file device colour ma= p as above should solve the problem for all devices which allow you to add to their colour map part way through a plot. I believe from what you have said above this should be possible for the xfig format, and that also seems to be the case for the libgd format (upon which the png and jpeg devices are based). Of course it is easy to sit here and theorize about a solution that will take considerable work on your part to implement, and I fully understand if you (or Andrew) don't have time/inclination to deal with this now. But the current situation is (I believe) that xfig and the libgd-based drivers make the simplistic assumption that there is a constant one-to-one transformatio= n between the PLplot colour maps and the device colour map. If you do the work to remove this assumption as above, then the xfig and png plots for th= e octave, tcl, and python front ends (which do several examples at a time) will not have the colour map cross-talk that now occurs. This will bring these devices' colour map behaviour finally into line with what occurs for the psc device which would be a Good Thing.... Alan |