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

Home » Public Forums » archive » Re: Use the device fonts for Ytitle on screen
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: Use the device fonts for Ytitle on screen [message #68626] Wed, 11 November 2009 15:06
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JDU writes:

> By the way, in PostScript which font is usually used?

If you are using PS_START, then Helvetica is the default
for both PostScript hardware fonts (FONT=0) and PostScript
True-Type fonts (FONT=1). You can choose other True-Type
fonat id you like by setting the FONT and TT_FONT keywords.
For example, to use a TIMES font:

PS_Start, FONT=1, TT_FONT='TIMES'

Cheers,

David
Re: Use the device fonts for Ytitle on screen [message #68627 is a reply to message #68626] Wed, 11 November 2009 14:57 Go to previous message
duxiyu@gmail.com is currently offline  duxiyu@gmail.com
Messages: 88
Registered: March 2007
Member
Ytitle is not only for PLOT, but also for some other procedures.
Therefore, as you metioned, the only method is to draw it in
PostScript and then convert it.

By the way, in PostScrip which font is usually used?

jdu


On Nov 11, 11:13 pm, David Fanning <da...@dfanning.com> wrote:
> pp writes:
>> On Nov 11, 7:50 pm, David Fanning <da...@dfanning.com> wrote:
>
>>> You will have to use Matlab or R to draw your plots if you want
>>> beautiful. IDL direct graphics doesn't do beautiful. Maybe you
>>> want to try an object graphics plot (e.g, xplot in my library,
>>> for example). Those fonts are mostly beautiful. :-)
>
>> Or try iplot.
>
> Or, if it's kludgy solutions you are after, draw the plot
> in PostScript, convert it to PNG with ImageMagick, and display
> *that* in an un-resizable IDL graphics window. The Y axis will
> look great! ;-)
>
> Cheers,
>
> David
Re: Use the device fonts for Ytitle on screen [message #68629 is a reply to message #68627] Wed, 11 November 2009 14:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
I wrote just a couple of minutes ago:


> Or, if it's kludgy solutions you are after, draw the plot
> in PostScript, convert it to PNG with ImageMagick, and display
> *that* in an un-resizable IDL graphics window. The Y axis will
> look great! ;-)

Here is my version of KludgePlot. It works great! Fabulous
graphics fonts!! :-)

PRO KludgePlot, x, y, _EXTRA=extra

CASE N_Params() OF
0: BEGIN
dep = Indgen(11)
indep = Indgen(N_Elements(dep))
xtitle='Time Dimension'
ytitle='Signal Strength'
END
1: BEGIN
dep = x
indep = Indgen(N_Elements(x))
END
2: BEGIN
dep = y
indep = x
END
ENDCASE

PS_START, FILENAME='myplot.ps'
Plot, indep, dep, XTITLE=xtitle, YTITLE=ytitle,
_STRICT_EXTRA=extra
PS_END, /PNG

image = Read_Png('myplot.png')
dims = Size(image, /DIMENSIONS)
Window, /Free, XSIZE=dims[1], YSIZE=dims[2]
TVImage, image
File_Delete, 'myplot.png'
File_Delete, 'myplot.ps'
END
Re: Use the device fonts for Ytitle on screen [message #68631 is a reply to message #68629] Wed, 11 November 2009 14:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pp writes:

> On Nov 11, 7:50 pm, David Fanning <da...@dfanning.com> wrote:
>
>> You will have to use Matlab or R to draw your plots if you want
>> beautiful. IDL direct graphics doesn't do beautiful. Maybe you
>> want to try an object graphics plot (e.g, xplot in my library,
>> for example). Those fonts are mostly beautiful. :-)
>
> Or try iplot.

Or, if it's kludgy solutions you are after, draw the plot
in PostScript, convert it to PNG with ImageMagick, and display
*that* in an un-resizable IDL graphics window. The Y axis will
look great! ;-)

Cheers,

David
Re: Use the device fonts for Ytitle on screen [message #68633 is a reply to message #68631] Wed, 11 November 2009 14:04 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 11, 7:50 pm, David Fanning <da...@dfanning.com> wrote:
> You will have to use Matlab or R to draw your plots if you want
> beautiful. IDL direct graphics doesn't do beautiful. Maybe you
> want to try an object graphics plot (e.g, xplot in my library,
> for example). Those fonts are mostly beautiful. :-)
>

Or try iplot.
Re: Use the device fonts for Ytitle on screen [message #68634 is a reply to message #68633] Wed, 11 November 2009 13:50 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
jdu writes:

> I meet a problem about using the device ('Windows') fonts for Ytitle
> on screen.
> For example,
>
>    !P.FONT = 0
>    DEVICE, SET_FONT='Microsoft Yahei'
>    PLOT, INDGEN(11), Xtitle='X Title', Ytitle='Y Title'
>
> But in the figure, the Ytitle look like as follows:
> Y
> T
> i
> l
> e
>
> For Hershey and TrueType fonts, there is no problem like this.
> But these fonts look awful on screen.
>
> How can I choose a beautiful font for the output on screen?

You will have to use Matlab or R to draw your plots if you want
beautiful. IDL direct graphics doesn't do beautiful. Maybe you
want to try an object graphics plot (e.g, xplot in my library,
for example). Those fonts are mostly beautiful. :-)

Cheers,

David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Tough System Variable Question for the IDL Gurus
Next Topic: Re: Tough System Variable Question for the IDL Gurus

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

Current Time: Wed Oct 08 18:57:17 PDT 2025

Total time taken to generate the page: 0.00694 seconds