comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Object Graphics Vector Output
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Object Graphics Vector Output [message #40851] Wed, 15 September 2004 08:55 Go to next message
Iam A. Lurker is currently offline  Iam A. Lurker
Messages: 3
Registered: September 2004
Junior Member
I'm not sure how 'clear' it is to me looking at that... the whole
reason I use IDL is so that I don't need to look at postscript code ;)
Thanks. Perhaps I'll need to consider upgrading again...
Re: Object Graphics Vector Output [message #40852 is a reply to message #40851] Wed, 15 September 2004 08:21 Go to previous messageGo to next message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Iam A. Lurker" <Iam.a.Lurker@gmail.com> wrote in message
news:ci9h9s$qq8@odah37.prod.google.com...
>> Hmmm.
>>
>> When I run your example, the axes have the same thickness in MacOS
> 10.3.5
>> running idl version...
>>
>> IDL> print, !version
>> { ppc darwin unix Mac OS X 6.1 Jul 14 2004 32 32}
>>
>> Have you looked at these before printing them, perhaps with Preview?
> Do they
>> have varying thicknesses in Preview?
>>
>> Ben
>
> IDL> print, !version
> { ppc darwin unix Mac OS X 6.0.3 Feb 26 2004 32 32}
>
> Yes, they do have one thick line when I vew in preview. For what it is
> worth, my primary computer is a 1GHz TiBook using a 64MB ATI Radeon
> 9000 mobility graphics card
> (http://www.apple.com/pr/library/2002/nov/06pbg4.html). I too am
> running 10.3.5 with Apple's X11.
>
> I've tried setting Idl.renderer = 1 in ~/Xdefaults but to no avail.
>
> I just tried using 6.1 and, in general, the axes and text in look to be
> much improved. Most importantly, both axes have the same thickness!!
> Sadly, this is only an eval license and it isn't clear if/when we'll
> upgrade to 6.1 (5.1 -> 6.0 last year).
>

Yes, this does seem to be fixed in IDL 6.1. We fixed a lot of issues with
vector output in this release.

Also, the graphics card shouldn't have any effect on vector output. And
selecting hardware/software rendering also has no effect on vector output.

It is easy to see the difference by looking at the generated PostScript,
rather than relying on some view tool.

In 6.0 we had the following (clearly wrong) PostScript code to draw the main
axis lines:

3 setlinewidth
n
375 375 M
1125 375 L
....
1 setlinewidth
[] 0 setdash
n
375 375 M
375 1125 L

In 6.1:

3.52778 setlinewidth
[] 0 setdash
0 0 0 R
...
375 375 M
375 1125 L
...
375 375 M
1125 375 L

So, there is a very definite difference.

Karl
Re: Object Graphics Vector Output [message #40853 is a reply to message #40852] Wed, 15 September 2004 06:49 Go to previous messageGo to next message
Iam A. Lurker is currently offline  Iam A. Lurker
Messages: 3
Registered: September 2004
Junior Member
> Hmmm.
>
> When I run your example, the axes have the same thickness in MacOS
10.3.5
> running idl version...
>
> IDL> print, !version
> { ppc darwin unix Mac OS X 6.1 Jul 14 2004 32 32}
>
> Have you looked at these before printing them, perhaps with Preview?
Do they
> have varying thicknesses in Preview?
>
> Ben

IDL> print, !version
{ ppc darwin unix Mac OS X 6.0.3 Feb 26 2004 32 32}

Yes, they do have one thick line when I vew in preview. For what it is
worth, my primary computer is a 1GHz TiBook using a 64MB ATI Radeon
9000 mobility graphics card
(http://www.apple.com/pr/library/2002/nov/06pbg4.html). I too am
running 10.3.5 with Apple's X11.

I've tried setting Idl.renderer = 1 in ~/Xdefaults but to no avail.

I just tried using 6.1 and, in general, the axes and text in look to be
much improved. Most importantly, both axes have the same thickness!!
Sadly, this is only an eval license and it isn't clear if/when we'll
upgrade to 6.1 (5.1 -> 6.0 last year).
Re: Object Graphics Vector Output [message #40855 is a reply to message #40853] Wed, 15 September 2004 05:06 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Antonio Santiago writes:

> Sorry, i'm on Solaris & IDL6.1.
> Executed with IDL6.0 result the same and with or without /NOTEXT too.
>
> I hope it will be usefull for you.

No line thickness difference in IDL 6.0 and 6.1 on
Windows XP. I would suspect a graphics card, frankly. :-)

Have you tried this with software rendering?

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: Object Graphics Vector Output [message #40856 is a reply to message #40855] Wed, 15 September 2004 05:04 Go to previous messageGo to next message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Iam A. Lurker wrote:
> In the trivial code below, I get two axes of different thickness and I
> am not sure why. Has anyone else run into this when using the NOTEXT
> keyword with IDLgrAxis?
>
> <grumble>Looking back through my notebook (i.e. 6 months), I seem to
> have an awful lot of postscript plots with multiple axes where the
> first 'notext' axis ismuch thicker than the others</grumble>
>
> Thanks,
> Iam
>
> Linux & OS X; IDL 6.0 & 5.6
>

Hello,

Hmmm. When I run your example, the axes have the same thickness in MacOS 10.3.5
running idl version...

IDL> print, !version
{ ppc darwin unix Mac OS X 6.1 Jul 14 2004 32 32}

Have you looked at these before printing them, perhaps with Preview? Do they
have varying thicknesses in Preview?

Ben
Re: Object Graphics Vector Output [message #40857 is a reply to message #40856] Tue, 14 September 2004 23:25 Go to previous messageGo to next message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Sorry, i'm on Solaris & IDL6.1.
Executed with IDL6.0 result the same and with or without /NOTEXT too.

I hope it will be usefull for you.


Antonio Santiago wrote:
> hi, here is my output in a screenshot.
>
>
>
> Iam A. Lurker wrote:
>
>> In the trivial code below, I get two axes of different thickness and I
>> am not sure why. Has anyone else run into this when using the NOTEXT
>> keyword with IDLgrAxis?
>>
>> <grumble>Looking back through my notebook (i.e. 6 months), I seem to
>> have an awful lot of postscript plots with multiple axes where the
>> first 'notext' axis ismuch thicker than the others</grumble>
>>
>> Thanks,
>> Iam
>>
>> Linux & OS X; IDL 6.0 & 5.6
>>
>> --------
>> oModel = obj_new('IDLgrModel')
>>
>> ; Removing NOTEXT makes the axes the same thickness?!?
>> oXAxis1 = obj_new('IDLgrAxis', 0, /NOTEXT, THICK=1, TICKLEN=0.02)
>> oYAxis1 = obj_new('IDLgrAxis', 1, /NOTEXT, THICK=1, TICKLEN=0.02)
>>
>> oModel -> Add, oXAxis1
>> oModel -> Add, oYAxis1
>>
>> oView = obj_new('IDLgrView', viewplane_rect=[-0.5,-0.5,2,2])
>> oView -> add, oModel
>>
>> oWindow = obj_new('IDLgrWindow', GRAPHICS_TREE=oView,
>> DIMENSIONS=[500,500])
>> oWindow -> erase
>> oWindow -> draw
>>
>> oClip = obj_new('IDLgrClipboard', GRAPHICS_TREE=oView, UNITS=2, $
>> DIMENSIONS=[15,15], resolution=[0.01,0.01])
>> oClip -> draw, filename='test.eps', postscript=1, vector=1
>>
>> end
>> --------
>>
>
>
> ------------------------------------------------------------ ------------
>
Re: Object Graphics Vector Output [message #41006 is a reply to message #40852] Thu, 16 September 2004 16:53 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Karl Schultz wrote:
> "Iam A. Lurker" <Iam.a.Lurker@gmail.com> wrote in message
> news:ci9h9s$qq8@odah37.prod.google.com...
>
>> I just tried using 6.1 and, in general, the axes and text in look to be
>> much improved. Most importantly, both axes have the same thickness!!
>> Sadly, this is only an eval license and it isn't clear if/when we'll
>> upgrade to 6.1 (5.1 -> 6.0 last year).
>>
>
> Yes, this does seem to be fixed in IDL 6.1. We fixed a lot of issues with
> vector output in this release.

My experience is quite different (apart from the text-size bug I
mentioned in another posting in this thread). I find, like the original
poster, that postscript vector output from IDL 6.1 looks very poor
mainly due (I think) to lines having very narrow widths.

The following URLs point to EPS and PNG files of a simple line plot
produced by IDL 6.0 and 6.1 on Windows:

ftp://ftp.niwa.co.nz/incoming/m.hadfield/X-Y_line_plot_6.0.e ps.gz
ftp://ftp.niwa.co.nz/incoming/m.hadfield/X-Y_line_plot_6.0.p ng
ftp://ftp.niwa.co.nz/incoming/m.hadfield/X-Y_line_plot_6.1.e ps.gz
ftp://ftp.niwa.co.nz/incoming/m.hadfield/X-Y_line_plot_6.1.p ng

When I view the EPS file produced by version 6.1 with Gsview, the text
looks fine, but the axis lines are barely visible and the tick marks not
visible at all. Ditto when I print it to a Postscript printer.

These are all produced from a view with UNITS = 2 and DIMENSIONS 12.15 x
12.15 (cm). The RESOLUTION of the IDLgrClipboard object from which the
EPS files were drawn was 0.028 (which my code takes from an IDLgrWindow
object to make the various forms of output as similar as possible, but
it makes no difference if I use the IDLgrClipboard default of 0.035).

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Object Graphics Vector Output [message #41036 is a reply to message #40852] Wed, 15 September 2004 21:20 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Karl Schultz wrote:
>
> Yes, this does seem to be fixed in IDL 6.1. We fixed a lot of issues with
> vector output in this release.
>
And introduced a bug: text appears several times too large when a view
has its PROJECTION property set to 2 (perspective). Randall Skelton
brought this to my attention today and I narrowed it down. I've reported
it to support@rsinc.com, but this seemed like a good place to mention it :-)

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Object Graphics Vector Output [message #41141 is a reply to message #41006] Wed, 29 September 2004 13:09 Go to previous message
Randall  Skelton is currently offline  Randall Skelton
Messages: 31
Registered: October 2004
Member
> My experience is quite different (apart from the text-size bug I
> mentioned in another posting in this thread). I find, like the
original
> poster, that postscript vector output from IDL 6.1 looks very poor
> mainly due (I think) to lines having very narrow widths.

Having learned the bulk of my object graphics knowledge from reading
through Mark's code, I am either falling into the same pitfalls or I
generally agree with his comments. In the code below, I observe the
following:

(1) The box and the vertical/horizontal lines are of slightly different
thickness. Pay particular attention to the bottom of the box when
previewing or printing

(2) The ordering of the filled polygon objects is consistently
incorrect. No matter what I try, I cannot get filled polygon (within
the same model) to lie beneath polylines. I would like black lines
around the red box!

I realise these are a little pedantic compared with the original post
where an axis itself is of different width but it is a bit of an
annoyance nevertheless. Depending on the resolution settings, the
lines can get quite thick and the difference becomes more apparent.

Are these bugs in IDL are bugs in the code below?

Cheers,
Randall


; ============================================================ ==
; Create the plot canvas (roughly one letter sized sheet of paper)

CanvasDim = [19.25,24.75]
oCanvasView = obj_new('IDLgrView', UNITS=2, DIMENSION=CanvasDim, $
VIEWPLANE_RECT=[0,0,1,1])

; ============================================================ ==
; Create the parameter box (top)
ParamDim = [19.0, 5.0] ; cm

; Boxes and lines
oParamBox = obj_new('IDLgrPolyline', [0,1,1,0,0], [0,0,1,1,0])

oTitleBox = obj_new('IDLgrPolygon', [0.95,1.0,1.0,0.95], $
[0.0,0.0,1.0,1.0], COLOR=[255,0,0], $
DEPTH_OFFSET=1)

; Vertical line
oTitleLine = obj_new('IDLgrPolyline', [0.95,0.95], [0,1])

; Horizontal line
oParamLine = obj_new('IDLgrPolyline', [0.00,0.95,0.95,0.00], $
[0.85,0.85,1.00,1.00])

; Parameter Model
oParamModel = obj_new('IDLgrModel', NAME='Parameters')
oParamModel -> add, oTitleBox
oParamModel -> add, oTitleLine
oParamModel -> add, oParamBox
oParamModel -> add, oParamLine

; Create the parameter view
oParamView = obj_new('IDLgrView', UNITS=2, DIMENSION=ParamDim, $
LOCATION=[0.125,CanvasDim[1]-ParamDim[1]-0.125], /TRANSPARENT, $
VIEWPLANE_RECT=[0,0,1,1])
oParamView -> add, oParamModel

; ============================================================ ==
; Group the objects
ogroup = obj_new('IDLgrViewgroup')
ogroup -> Add, oCanvasView
ogroup -> Add, oParamView

owin = obj_new('IDLgrWindow', GRAPHICS_TREE=ogroup, UNITS=2, $
DIMENSIONS=CanvasDim)
owin -> draw

resolution = 1.0/CanvasDim * 0.5

oclip = obj_new('IDLgrClipboard', GRAPHICS_TREE=ogroup, UNITS=2, $
DIMENSIONS=CanvasDim, RESOLUTION=resolution)
oclip -> draw, FILENAME='test_vector.eps', /VECTOR, /POSTSCRIPT
oclip -> draw, FILENAME='test_bitmap.eps', /POSTSCRIPT

end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Hyperthreading and IDL?
Next Topic: Image composition

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:22:30 PDT 2025

Total time taken to generate the page: 1.28027 seconds