<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, <br>
<br>
uhhhh I am stupid. "Dark_Matter_Density" is actually your key, not the
label... So yes, keep it that way.<br>
The error seems to come from an error in yt which generates
automatically a label. May be there is a way to force yt to use a
certain label ?<br>
<br>
JC<br>
<br>
<br>
Agarwal, Shankar a écrit :
<blockquote
 cite="mid:12DAFB1E356ED1408756C4F9AE2DCC639F1EE1@MAILBOX-32.home.ku.edu"
 type="cite">
  <pre wrap="">Hi,

nope. It gives a syntax error.

Traceback (most recent call last):
  File "1.py", line 12, in <module>
    p = pc.add_projection("Dark\_Matter\_Density", 0, source=reg1)
KeyError: 'Dark\\_Matter\\_Density'

Shankar

-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:yt-users-bounces@lists.spacepope.org">yt-users-bounces@lists.spacepope.org</a> on behalf of Jean-Claude Passy
Sent: Tue 3/30/2010 10:40 AM
To: Discussion of the yt analysis package
Subject: Re: [yt-users] Labels on plot

Hi,

try the LaTex syntax:

p = pc.add_projection("Dark\_Matter\_Density", 0, source=reg1)


Jean-Claude

Agarwal, Shankar a écrit :
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

<a class="moz-txt-link-freetext" href="http://drop.io/Dark_Matter_Density">http://drop.io/Dark_Matter_Density</a>

In the above plot, the label is Dark_Matter_Density. But the "M" in matter and "D" in Density do not print correctly.

How can I correct "M" and "D" ?


Here is the script I am using...

from yt.mods import *

fn = "RedshiftOutput0001"
pf = load(fn)
reg = pf.h.region([0.5, 0.5, 0.5], [0.45, 0.0, 0.0], [0.55, 1.0, 1.0])
pf.h.save_object(reg, "region")
reg1 = pf.h.load_object("region")

pc = PlotCollection(pf,center=[0.5, 0.5, 0.5])
p = pc.add_projection("Dark_Matter_Density", 0, source=reg1)
p.set_zlim(1e-8, 5e-3)
pc.save("%s" % pf)


Shankar
_______________________________________________
yt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>
<a class="moz-txt-link-freetext" href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
yt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>
<a class="moz-txt-link-freetext" href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>

  </pre>
</blockquote>
</body>
</html>