Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion cgcolorbar problem in postscript
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Phillip M. Bitzer  
View profile  
 More options Nov 7 2012, 11:24 am
Newsgroups: comp.lang.idl-pvwave
From: "Phillip M. Bitzer" <pm.bit...@uah.edu>
Date: Wed, 07 Nov 2012 10:22:52 -0600
Local: Wed, Nov 7 2012 11:22 am
Subject: Re: cgcolorbar problem in postscript
Like David said, this is not a problem with the file or cgColorbar, but
I don't think this is a "problem" exactly with Preview either - it seems
to be an issue with aliasing. Consider the program below, which is
similar to yours (note I don't load in a color bar, rather I specify the
RGB palette). After producing the eps file, open it in Preview. You'll
probably see the graduated colors, which I think is what you are reporting.

If you go to Preferences->PDF, and toggle the Check box for "Smooth text
and line art", then you will see your discrete color bar reappear. The
text won't look as nice, however. This is an issue with the default
aliasing used by Preview - smoothing introduces the graduated colors you
see.

For reference, here's what I see:
https://www.dropbox.com/s/rvax832ot0t8l2b/colorbar_nosmooth.png

https://www.dropbox.com/s/2b2k8jj1taifpk0/colorbar_smooth.png

PRO pmbtest, Do_Ps = do_ps

   colors = [ 'hot pink',  'indian red',  'dark green', 'green', $
      'sky blue',  'cadet blue',  'grey',  'blue',  'purple',  'red']

   n_color = N_ELEMENTS(colors)

   do_ps = KEYWORD_SET(do_ps)
   IF do_ps THEN BEGIN
     PS_START, filename='test.eps', /ENCAP, /NOMATCH, $
      XSIZE=6, YSIZE=2, /INCHES
   ENDIF ELSE cgERASE, 'white'

   rgb = cgCOLOR(colors, /TRIPLE)

   ;display the colorbar
   cgCOLORBAR, /DISCRETE, NCOLORS=n_color, PALETTE = rgb, POSITION=[0.1,
0.2, 0.9, 0.9]

   IF do_ps THEN PS_END

END


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.