MathGroup Archive 2008

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

Search the Archive

Re: Text XY-size control in 2D graphics?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85126] Re: Text XY-size control in 2D graphics?
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Wed, 30 Jan 2008 05:56:32 -0500 (EST)

On 1/28/08 at 3:27 AM, agrobertson at telus.net (Gordon Robertson)
wrote:

>I would like to generate sequence logos
>(http://weblogo.berkeley.edu/ examples.html) using v6's 2D graphics
>'Text'.

>Below is an early and unsuccessful attempt to build a single column
>of stacked ACGT characters. Clearly I don't understand how to
>position letters correctly, using settings for text size, position
>and offset, and image size... but I imagine that it's possible to do
>this. What's currently a bigger concern is that I need to control
>the height of a character while keeping its width fixed, but for
>sizing letters I see only FontSize[param]. I've checked the online
>documentation, Options[Text], 'Mma Navigator', and Google, without
>finding how to do this.

>Can anyone help by showing how to control Text character width and
>height independently?

As far as I know there is no provision within any shipped
version of Mathematica to control font height independent of
font width. And for precise control of the positions letters
appear, I believe you will find it necessary to use a fixed
width font rather than a proportionally space font such as:

>ff = "Helvetica";

The one thing you might want to try is using Hershey fonts.
There is a package found at:

<http://library.wolfram.com/infocenter/Conferences/196>

Since this package converts each letter to a graphic, it is
possible to control height and width independently. I
successfully used this package (after a bit of tweaking) with
something like version 4.x to get around a problem on Macs where
letters were not rotated correctly when the text direction was
rotated. I stopped using this package when Wolfram released a
version of Mathematica without this problem. I think that was
version 5.1 or 5.2 but I don't specifically recall.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: FITS Export w/ Elements in V6?
  • Next by Date: Re: Filled Polar plots
  • Previous by thread: Re: Text XY-size control in 2D graphics?
  • Next by thread: Re: Text XY-size control in 2D graphics?