Hello Gabrielle,

On 17.01.07, Gabrielle David wrote:
> First question - How do you get the font in the axes titles on a bar graph
> to be the same as the the text in the axes labels and the key. It looks like
> it is not latex, and my symbols that are meant to show up in latex are not
> formatted properly.
> 
> text.preamble("\usepackage[version=3]{mhchem}")
> 
> The \ce{2H} should come up as an H with a superscript 2 before it, but it
> just comes out as 2H (i.e the 2 is not superscript).

This is due to the package mhchem which does not behave as you expect
it to do: 2H will not provide a superscript. Please convince yourself
of this by running the latex code:

\documentclass{article}
\usepackage[version=3]{mhchem}
\begin{document}
\ce{2H} -- \ce{H2}
\end{document}


> Second question - Is there any way that I can make the width of the bars
> consistent between graphs. In the graph I am trying to make I am comparing
> two graphs inserted on the same canvas. I would like the two graphs to have
> the same width bars, but one graph is a nested bar graph with 3 data sets on
> it, and the other graph only has one data set on it. So the graph with the
> one data set has wider bars than the one with 3.

You can add "dummy" data to your second data file. Then, you plot it
just as the first one, but with title=None in the graph.data.file
constructor.

> g2.plot([graph.data.file("NMR2.dat", xname="$1, 0", y=2, title="CLDE2"),
>          graph.data.file("NMR2.dat", xname="$1, 1", y=2, title=None),
>          graph.data.file("NMR2.dat", xname="$1, 2", y=2, title=None)],
>        [graph.style.bar()])

Michael.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to