Using contour in postscripts produces a "stripe" effect? [message #65622] |
Sun, 15 March 2009 10:11  |
robparker23
Messages: 10 Registered: March 2009
|
Junior Member |
|
|
I was hoping that someone could help.
When I create contour plots in the postscript device, they always seem
to contain some manner of "striping".
My code looks like:
SET_PLOT, 'ps'
loadct, 39
!p.color=0
!p.background=255
filename = 'contour.eps'
DEVICE, FILENAME=filename, /COLOR, BITS_PER_PIXEL=8, /ENCAPSULATED, /
PORTRAIT, XSIZE=18, YSIZE=8, XOFFSET=5, YOFFSET=2
contour,mean,lons,heights, /cell_fill, yrange=[300,50], xrange=
[-175,175], levels=lev, ystyle=1, xstyle=1
, position=[0.1,0.15,0.85,0.9], charsize=1, charthick=2
DEVICE, /CLOSE
Hopefully you can see from the image here what I mean:
http://img19.imageshack.us/img19/5319/contourstripingexample .png
Anyone any ideas what I'm doing wrong?
|
|
|
Re: Using contour in postscripts produces a "stripe" effect? [message #65699 is a reply to message #65622] |
Mon, 16 March 2009 13:19  |
robparker23
Messages: 10 Registered: March 2009
|
Junior Member |
|
|
> I have seen the same issues with using CONTOUR and /CELL_FILL with
> some cross-sections I have produced. It appears to be a dithering-like
> artifact. I have looked through much of ITTs documentation and have
> found nothing regarding dithering. I think it is just something you'll
> have to live with. It may be something simple enough to question ITT
> about. I assume this "striping" feature is not their intention with
> PostScript.
>
> Cheers,
> Cameron Homeyer
Thanks for that, I'm sort of glad it's not just me ;-)
This doesn't appear to happen with /fill but then the colours are all
incorrect as per the link to David's site I posted above.
To Andy: It's also not an artifact of converting between eps and png,
it's actually in the original eps files before I convert them to PNG.
|
|
|
Re: Using contour in postscripts produces a "stripe" effect? [message #65709 is a reply to message #65622] |
Mon, 16 March 2009 08:30  |
Homeyer
Messages: 9 Registered: March 2009
|
Junior Member |
|
|
On Mar 15, 4:58 pm, robparke...@googlemail.com wrote:
>> Well, whatever the problem is, I don't think there is
>> much you can do about it. So I was just trying to find
>> out if we had any alternatives before I delivered the
>> bad news. :-)
>
> So this isn't a common problem with contour/postscript?
>
> Thanks for your help, I can live with it if I have to but just thought
> it might be something simple I was doing wrong.
I have seen the same issues with using CONTOUR and /CELL_FILL with
some cross-sections I have produced. It appears to be a dithering-like
artifact. I have looked through much of ITTs documentation and have
found nothing regarding dithering. I think it is just something you'll
have to live with. It may be something simple enough to question ITT
about. I assume this "striping" feature is not their intention with
PostScript.
Cheers,
Cameron Homeyer
|
|
|
Re: Using contour in postscripts produces a "stripe" effect? [message #65713 is a reply to message #65622] |
Mon, 16 March 2009 03:16  |
Andy Heaps
Messages: 22 Registered: March 2006
|
Junior Member |
|
|
Hi Rob,
did you use the ImageMagick command convert to produce the PNG file?
If so then try:
convert -density 400 -resize 25% file.eps file.png
Cheers
Andy
robparker23@googlemail.com wrote:
> I was hoping that someone could help.
>
> When I create contour plots in the postscript device, they always seem
> to contain some manner of "striping".
>
> My code looks like:
>
>
>
> SET_PLOT, 'ps'
>
> loadct, 39
> !p.color=0
> !p.background=255
>
> filename = 'contour.eps'
> DEVICE, FILENAME=filename, /COLOR, BITS_PER_PIXEL=8, /ENCAPSULATED, /
> PORTRAIT, XSIZE=18, YSIZE=8, XOFFSET=5, YOFFSET=2
>
> contour,mean,lons,heights, /cell_fill, yrange=[300,50], xrange=
> [-175,175], levels=lev, ystyle=1, xstyle=1
> , position=[0.1,0.15,0.85,0.9], charsize=1, charthick=2
>
> DEVICE, /CLOSE
>
>
>
> Hopefully you can see from the image here what I mean:
> http://img19.imageshack.us/img19/5319/contourstripingexample .png
>
> Anyone any ideas what I'm doing wrong?
|
|
|
Re: Using contour in postscripts produces a "stripe" effect? [message #65717 is a reply to message #65622] |
Sun, 15 March 2009 15:33  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
robparker23@googlemail.com writes:
> So this isn't a common problem with contour/postscript?
It isn't anything I've seen before, but...I'm pretty
sure I haven't seen everything. :-)
> Thanks for your help, I can live with it if I have to but just thought
> it might be something simple I was doing wrong.
Have you tried slightly smoothing your data before you
contour it? Did FILL do any good?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Using contour in postscripts produces a "stripe" effect? [message #65718 is a reply to message #65622] |
Sun, 15 March 2009 14:58  |
robparker23
Messages: 10 Registered: March 2009
|
Junior Member |
|
|
> Well, whatever the problem is, I don't think there is
> much you can do about it. So I was just trying to find
> out if we had any alternatives before I delivered the
> bad news. :-)
So this isn't a common problem with contour/postscript?
Thanks for your help, I can live with it if I have to but just thought
it might be something simple I was doing wrong.
|
|
|
Re: Using contour in postscripts produces a "stripe" effect? [message #65719 is a reply to message #65622] |
Sun, 15 March 2009 14:49  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
robparker23@googlemail.com writes:
> I'm using cell_fill as I'm plotting contours on maps as well and
> wanted it to be consistent and after reading this:
> http://www.dfanning.com/color_tips/fill_colors.html thought I should
> avoid /fill.
>
> I'll see if it gives the same problems with the striping.
>
> What I assumed the problem was was maybe the size of my plots or the
> length/width ratio producing the stripes but changing those hasn't
> fixed it.
Well, whatever the problem is, I don't think there is
much you can do about it. So I was just trying to find
out if we had any alternatives before I delivered the
bad news. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|