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

Home » Public Forums » archive » Re: Nice Fonts in Direct Graphics
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: Nice Fonts in Direct Graphics [message #65098] Tue, 10 February 2009 15:26
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Thanks people !

I'm agree with david about the keyword names and method
descriptions... But don't worry.
I could use the PS_START/PS_END routines with ImageMagick but the
problem is that if somebody wants to run my application, install the
ImageMagick and configurate it will be required. I don't like this
option.

I'll try to use the gmwindow and modify it.

Thanks !

B.
Re: Nice Fonts in Direct Graphics [message #65100 is a reply to message #65098] Tue, 10 February 2009 12:38 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 10, 2:18 pm, David Fanning <n...@dfanning.com> wrote:
> bernat writes:
>> If I use object graphics to have nice looking fonts, the problem is
>> the quantity of the objects I've. The Draw method is so slow for
>> draw   more than 15000 graphic objects (the result when I converted
>> each plot writted in direct graphics to object graphics)
>
> Yes, it wouldn't surprise me if it was faster to use
> the PS_START/PS_END with Direct Graphics approach and
> just display the resulting PNG file produced from
> ImageMagick than it would be to draw all those objects!
>
> Cheers,
>
> David
>
> P.S. I notice R, which is similar in a *lot* of ways to
> IDL, doesn't have any problem with nice looking fonts in
> its plots. :-)
>
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Rabble rouser...
Re: Nice Fonts in Direct Graphics [message #65101 is a reply to message #65100] Tue, 10 February 2009 12:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Yes, it wouldn't surprise me if it was faster to use
> the PS_START/PS_END with Direct Graphics approach and
> just display the resulting PNG file produced from
> ImageMagick than it would be to draw all those objects!

Perhaps you could have a keyword to set user expectations
appropriately. Something like this:

IDL> MyPlot, data, /HIGH_QUALITY_RENDERING

It would not only take him a long time to type, but
it would be put it in his mind that it will take a
long time to render, too. :-)

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Nice Fonts in Direct Graphics [message #65102 is a reply to message #65101] Tue, 10 February 2009 12:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bernat writes:

> If I use object graphics to have nice looking fonts, the problem is
> the quantity of the objects I've. The Draw method is so slow for
> draw more than 15000 graphic objects (the result when I converted
> each plot writted in direct graphics to object graphics)

Yes, it wouldn't surprise me if it was faster to use
the PS_START/PS_END with Direct Graphics approach and
just display the resulting PNG file produced from
ImageMagick than it would be to draw all those objects!

Cheers,

David

P.S. I notice R, which is similar in a *lot* of ways to
IDL, doesn't have any problem with nice looking fonts in
its plots. :-)

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Nice Fonts in Direct Graphics [message #65103 is a reply to message #65102] Tue, 10 February 2009 12:00 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
On Feb 10, 5:51 pm, bernat <bernat.puigdomen...@gmail.com> wrote:
> I do a lot of work in the Direct Graphics and I would like to use nice
> looking fonts..

Here's a routine to produce better looking direct graphics using the
same technique. You can produce a plot like this:

http://hrscview.fu-berlin.de/mex4/software/gmwindow/gmwindow .png

using a syntax very close to the usual:

w=obj_new("gmwindow",title="gmwindow")

w->plot,indgen(20),findgen(20)^2,psym=-5,ytitle="an axis
title",background=200,color=0,charsize=2
w->oplot,indgen(20),400-findgen(20)^2,psym=-4,color=128
w->xyouts,10,200,"a label",color=0,charsize=3

http://hrscview.fu-berlin.de/mex4/software/gmwindow/gmwindow __define.pro

regards,
Greg
Re: Nice Fonts in Direct Graphics [message #65108 is a reply to message #65103] Tue, 10 February 2009 10:30 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 10, 11:33 am, bernat <bernat.puigdomen...@gmail.com> wrote:
> I tried this solution for my code and it doesn't works.
> I've different colors and plots, oplots, etc..
>
> I don't know, maybe the problem is the !P struct..
>
> If I use object graphics to have nice looking fonts, the problem is
> the quantity of the objects I've. The Draw method is so slow for
> draw   more than 15000 graphic objects (the result when I converted
> each plot writted in direct graphics to object graphics)

Perhaps you have to set up your Z-buffer more carefully - things like
pixel depth, etc.
Re: Nice Fonts in Direct Graphics [message #65110 is a reply to message #65108] Tue, 10 February 2009 09:33 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
I tried this solution for my code and it doesn't works.
I've different colors and plots, oplots, etc..

I don't know, maybe the problem is the !P struct..

If I use object graphics to have nice looking fonts, the problem is
the quantity of the objects I've. The Draw method is so slow for
draw more than 15000 graphic objects (the result when I converted
each plot writted in direct graphics to object graphics)
Re: Nice Fonts in Direct Graphics [message #65113 is a reply to message #65110] Tue, 10 February 2009 09:09 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
"Direct Graphics" and "Nice Fonts" are two terms that should not be used in
the same sentence. :-) Seriously David's solution is as godd as it gets, so
use it...


"bernat" <bernat.puigdomenech@gmail.com> wrote in message
news:cf356b79-7a87-4bdc-aeaa-21977e304e18@p37g2000yqd.google groups.com...
> I do a lot of work in the Direct Graphics and I would like to use nice
> looking fonts..
> I found this routine in the coyote library for display nice fonts in Z-
> graphics buffer:
>
> data = Dist(41)
> Window, XSize=300, YSize=300, Title='Normal Picture'
> Surface, data, XTitle='This is X Title', YTitle='This is Y Title', $
> ZTitle='This is Z Title', Font=1, Charsize=2.5, $
> Position=[0.25, 0.15, 0.90, 0.90, 0.15, 0.95]
> thisDevice = !D.Name
> Set_Plot, 'Z'
> Device, Set_Resolution=[1200, 1200]
> Surface, data, XTitle='This is X Title', YTitle='This is Y Title', $
> ZTitle='This is Z Title', Font=1, Charsize=2.5*4, $
> XThick=4, YThick=4, ZThick=4, Thick=4, $
> Position=[0.25, 0.15, 0.90, 0.90, 0.15, 0.95]
> snapshot = TVRD()
> Set_Plot, thisDevice
> Window, 1, XSize=300, YSize=300, Title='Z Buffer Picture'
> TV, Rebin(snapshot, 300, 300)
>
> I want something like that for my program... Maybe I could use the
> same code to change my fonts in my plots but maybe there is another
> way to do that.
> Thanks,
>
> Bernat
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idlgrcontour and clip_planes ?
Next Topic: implementation of geotiff keys

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

Current Time: Wed Oct 08 13:39:41 PDT 2025

Total time taken to generate the page: 0.00430 seconds