Issues with TeX symbols and font changes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issues with TeX symbols and font changes

Kacey A.
Hello all,

I've spent more time than I care to share trying to remedy this, but it just doesn't seem to be working... So long story short, I'm trying to insert a special symbol in my axis label, so I type the following:

[1] xlabel = (r"Wavelength ($\AA$)")

...in order to receive the symbol for angstroms (an "A" with a circle above it). Problem is... whereas the rest of my plot is in whatever the default Scipy plot font is (Tahoma, perhaps?), the stubborn angstroms symbol is in Times New Roman-esque font, which is bothering me to no end. I've attempted just changing the font of the entire font by using

[2] font = {"fontname":"Times New Roman"}
...
[3] xlabel = (ur"Wavelength ($\AA$)", **font)

...but unfortunately that does nothing to affect the font of the axis tickmark labels (i.e. the numbers along the axes) -- so while my axis labels (excluding the angstrom symbol) and plot text (i.e. text(x,y,string)) might be in the font set via command [2], the axis numbering will *still* be in the default (i.e. Tahoma).

For what help it's worth, I'm running OS X (10.4.11) and Python 2.5.1, although I'm not 100% certain of what version of Scipy and Numpy I have installed... (I *think* I'm running Scipy 0.3.2). I'm also using TextMate to type and run my scripts.

Thanks so much for any help in advance! I really love SciPy, but if there's really no feasible workaround for this... I might just have to use a different package altogether. Thanks again.

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Issues with TeX symbols and font changes

cdavid
Kacey A. wrote:

> Hello all,
>
> I've spent more time than I care to share trying to remedy this, but
> it just doesn't seem to be working... So long story short, I'm trying
> to insert a special symbol in my axis label, so I type the following:
>
> [1] xlabel = (r"Wavelength ($\AA$)")
>
> ...in order to receive the symbol for angstroms (an "A" with a circle
> above it). Problem is... whereas the rest of my plot is in whatever
> the default Scipy plot font is (Tahoma, perhaps?), the stubborn
> angstroms symbol is in Times New Roman-esque font, which is bothering
> me to no end. I've attempted just changing the font of the entire font
> by using
>
> [2] font = {"fontname":"Times New Roman"}
> ...
> [3] xlabel = (ur"Wavelength ($\AA$)", **font)
>
> ...but unfortunately that does nothing to affect the font of the axis
> tickmark labels (i.e. the numbers along the axes) -- so while my axis
> labels (excluding the angstrom symbol) and plot text (i.e.
> text(x,y,string)) might be in the font set via command [2], the axis
> numbering will *still* be in the default (i.e. Tahoma).

I am not sure which package you are using for plotting, but in any case,
this does not seem to be linked to scipy. Maybe you will have more luck
on the maplotlib mailing list.
>
> For what help it's worth, I'm running OS X (10.4.11) and Python 2.5.1,
> although I'm not 100% certain of what version of Scipy and Numpy I
> have installed... (I *think* I'm running Scipy 0.3.2). I'm also using
> TextMate to type and run my scripts.

python -c "import scipy; scipy.version.version; import numpy;
numpy.version.version"

will give you this information, BTW.

cheers,

David
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Issues with TeX symbols and font changes

Kacey A.
In reply to this post by Kacey A.
On Wed, Apr 16, 2008 at 9:24 PM, <[hidden email]> wrote:
Message: 5
Date: Thu, 17 Apr 2008 09:41:53 +0900
From: David Cournapeau <[hidden email]>
Subject: Re: [SciPy-user] Issues with TeX symbols and font changes
To: SciPy Users List <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Kacey A. wrote:
> Hello all,
>
> I've spent more time than I care to share trying to remedy this, but
> it just doesn't seem to be working... So long story short, I'm trying
> to insert a special symbol in my axis label, so I type the following:
>
> [1] xlabel = (r"Wavelength ($\AA$)")
>
> ...in order to receive the symbol for angstroms (an "A" with a circle
> above it). Problem is... whereas the rest of my plot is in whatever
> the default Scipy plot font is (Tahoma, perhaps?), the stubborn
> angstroms symbol is in Times New Roman-esque font, which is bothering
> me to no end. I've attempted just changing the font of the entire font
> by using
>
> [2] font = {"fontname":"Times New Roman"}
> ...
> [3] xlabel = (ur"Wavelength ($\AA$)", **font)
>
> ...but unfortunately that does nothing to affect the font of the axis
> tickmark labels (i.e. the numbers along the axes) -- so while my axis
> labels (excluding the angstrom symbol) and plot text (i.e.
> text(x,y,string)) might be in the font set via command [2], the axis
> numbering will *still* be in the default (i.e. Tahoma).

I am not sure which package you are using for plotting, but in any case,
this does not seem to be linked to scipy. Maybe you will have more luck
on the maplotlib mailing list.
>
> For what help it's worth, I'm running OS X (10.4.11) and Python 2.5.1,
> although I'm not 100% certain of what version of Scipy and Numpy I
> have installed... (I *think* I'm running Scipy 0.3.2). I'm also using
> TextMate to type and run my scripts.

python -c "import scipy; scipy.version.version; import numpy;
numpy.version.version"

will give you this information, BTW.

cheers,

David


Thanks so much for those tips. I'll definitely ask the matplotlib mailing list for tips. My apologies for spamming the wrong list -- I assumed it was linked with SciPy but clearly I have much to learn about which package is doing what :)

Also, thanks for that line on how to find version information, that'll definitely be useful in the future.

Cheers,
Kacey

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user