Re: Object Graphics Vector Output [message #40851] |
Wed, 15 September 2004 08:55  |
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   |
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   |
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 #40857 is a reply to message #40856] |
Tue, 14 September 2004 23:25   |
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   |
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 #41141 is a reply to message #41006] |
Wed, 29 September 2004 13:09  |
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
|
|
|