Karl Schultz wrote:
> On Thu, 13 Jul 2006 14:31:22 -0400, Paul Van Delst wrote:
>
>
>> Hello there,
>>
>> A colleague produced a colour X-Y plot for a paper and saved it to a regular old PS file.
>> The editor mailed back stating that the file contains RGB colours and could we please
>> create the file in CMYK colours.
>>
>> How does one do this? Using
>> DEVICE,/CMYK
>> produced exactly the same PS file.
>>
>> Doing,
>> TVLCT,r,g,b,/GET
>> CMYK_CONVERT,c,m,y,k,r,g,b,/TO_CMYK
>> produced the appropriate c, m, y, and k arrays, but how does one "load" the CMYK arrays to
>> be used? Doing
>> TVLCT,c,m,y
>> produced exactly what I thought would happen - no black.
>>
>> Any ideas?
>
>
> Yes.
>
> Try:
>
> DEVICE, /CMYK, /COLOR
>
> You need to put the device into color mode when you select CMYK :-).
Yes, the /COLOR switch was included in a previous DEVICE call (to set the other PS stuff)
> Make sure that you do any LOADCT's after the DEVICE call.
Ah. Yes, there were TVLCT calls after the DEVICE call.
> You also should not need to put CMYK values in the color table with
> TVLCT/CMYK_CONVERT. The PS device should do this for you.
>
> For a program like:
>
>
> SET_PLOT, 'ps'
> DEVICE, /CMYK, /COLOR
> LOADCT, 5
> n = 50 ; Size of array for Bessel
> ; Make the Bessel function:
> a = BESELJ(SHIFT(DIST(n), n/2, n/2)/2, 0)
> TVSCL, DIST(n)
> nlev = 8 ; Number of contour levels
> ; Make the Contour at normalized Z=.6:
> CONTOUR, a, /OVERPLOT, ZVALUE=.6, /T3D, $
> LEVELS=FINDGEN(nlev)*1.5/nlev-.5, COLOR=1
> DEVICE, /CLOSE
>
>
>
> you'll see an image in the PS file that uses a COLORTAB and
>
> and is rendered with something like:
>
> {COLORTAB currentfile picstr readhexstring pop 0 get
> 4 mul 4 getinterval } bind false 4 colorimage
>
> Things like contour lines will have postscript color commands like
>
> 1.000 1.000 0.000 0.980 setcmykcolor
>
> Hope this helps,
Excellent! Yep - we now have a cmyk output file! Thanks very much!
(The reason for the multiple !!!'s is that my colleague is leaving for a conference to
China for a couple of weeks and the editor wanted a reply today. So, tell your boss you
deserve a raise! :o)
cheers,
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|