MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Font and Style problems using Image to create bitmaps of Plots/Charts etc

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119964] Font and Style problems using Image to create bitmaps of Plots/Charts etc
  • From: Roger Wilson <rogerhw999 at gmail.com>
  • Date: Sat, 2 Jul 2011 05:01:05 -0400 (EDT)

In a default setting...

plot = Plot[Sin[x], {x, -10, 10}, Frame -> True, PlotLabel -> "Sine
Wave"]

and

Image[plot]

Will look the same.

However, if Style options have been set either through OptionInspector
FormattingOptions/GraphicsBoxOptions/GraphicsBoxOptions/DefaultStyle
or the "Graphics" style has been altered in the notebook's StyleSheet
(e.g. a change of FontFamily, FontWeight, FontFace etc).  Then the two
will be different.  The Graphic entity plot will have the styles
applied and the raster produced by Image will have them all stripped
off.

Now something like this does work...

plot2 = Plot[Sin[x],{x,-10,10},Frame->True,PlotLabel->"Sine
Wave",FrameTicksStyle->Directive[FontSize->15,FontColor-
>Blue,FontSlant->Italic,FontWeight->Bold]]

Image[plot2]

Both are pretty much identical so Image can produce the correct styles
just clearly does not inherit them from either GraphicsBoxOptions (nor
RasterBoxOptions) or from the prevailing "Graphics" style of the
stylesheet.

So where do they come from and can they be changed?

Many thanks for reading.


  • Prev by Date: Re: Abbreviating path name in task bar tabs
  • Next by Date: Re: How to write a "proper" math document
  • Previous by thread: Re: Reading Data Table
  • Next by thread: Re: Font and Style problems using Image to create bitmaps of Plots/Charts etc