<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Aaron, thanks very much. <div class=""><br class=""></div><div class="">Yea, using the axes “set_title” worked nicely. Thx for including the example! I’m new to python and matplotlib.</div><div class=""><br class=""></div><div class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><i class=""><font size="3" class="">Cheers!</font></i></div><div class=""><i class=""><font size="3" class=""><br class=""></font></i></div><div class=""><i class=""><font size="3" class="">Rick Sarmento</font></i></div><div style="color: rgb(0, 0, 0); font-size: 13px;" class="">SESE Astronomy/Astrophysics Grad Student</div><div style="color: rgb(0, 0, 0); font-size: 13px;" class=""><a href="mailto:rsarment@asu.edu" class="">rsarment@asu.edu</a></div><div style="color: rgb(0, 0, 0);" class=""><br class=""></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Oct 28, 2014, at 4:53 PM, Aaron Smith <<a href="mailto:asmith@astro.as.utexas.edu" class="">asmith@astro.as.utexas.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    <div class="moz-cite-prefix">Hi Rick,<br class="">
      <br class="">
      This looks like a bug to me, but I'm not 100% sure as I've never
      really used set_title in the past. As a workaround you may want to
      either:<br class="">
      (i) use annotate_text calls, or<br class="">
      (ii) work with the pyplot API directly, e.g. ax =
      plot['cell_mass'].axes will return the axes object which you can
      manipulate with standard matplotlib functions. You can even build
      the axes objects before making the PhasePlot if you want complete
      control.<br class="">
      <br class="">
      Both methods are demonstrated here:
<a href="http://nbviewer.ipython.org/github/astrosmith/Notebooks/blob/master/set_title.ipynb" class="">nbviewer.ipython.org/github/astrosmith/Notebooks/blob/master/set_title.ipynb</a><br class="">
      <br class="">
      Cheers,<br class="">
      Aaron<br class="">
      <br class="">
      <br class="">
      On 10/28/14, 4:39 PM, Rick Sarmento wrote:<br class="">
    </div>
    <blockquote cite="mid:2D59C04E-A551-494F-B462-D7DDE371E575@asu.edu" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1" class="">
      Hello all,
      <div class=""><br class="">
      </div>
      <div class="">I’m trying to generate some plot titles on my phase
        diagrams (RAMSES data)… But neither of the approaches works:</div>
      <div class=""><br class="">
      </div>
      <blockquote style="margin: 0 0 0 40px; border: none; padding:
        0px;" class="">
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class=""># fractional=True
                keyword -- divide the profile data by the sum. </span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">ds =
yt.load("/Users/earnric/RAMSES-Data/cooling/output_00012/info_00012.txt")</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">ad = ds.all_data()</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">plot =
                yt.PhasePlot(ad, "density", "temperature", "cell_mass",
                weight_field=None, fractional=True )</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">zStr = "Gas phase z =
                %.1f" % ds.current_redshift</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">plot.set_zlim('cell_mass',
                1e-9, 1e-1)</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">plot.set_title("cell_mass",
                zStr)  <span class="Apple-tab-span" style="white-space:pre"> </span>## Approach 1</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">plot.plot_title=zStr <span class="Apple-tab-span" style="white-space:pre"> </span>##
                Approach 2</span></font></div>
        </div>
        <div class="">
          <div class=""><font class="" face="Courier New"><span style="font-size: 12px;" class="">plot.show()</span></font></div>
        </div>
      </blockquote>
      <div class=""><br class="">
      </div>
      <div class="">I can’t figure out (from the documentation) which is
        supposed to work! Both are listed here:</div>
      <div class=""><br class="">
      </div>
      <div class=""><a moz-do-not-send="true" href="http://yt-project.org/docs/3.0/reference/api/generated/yt.visualization.profile_plotter.PhasePlot.html?highlight=phaseplot" class="">http://yt-project.org/docs/3.0/reference/api/generated/yt.visualization.profile_plotter.PhasePlot.html?highlight=phaseplot</a></div>
      <div class=""><br class="">
      </div>
      <div class="">Thx for the help...</div>
      <br class="">
      <br class="">
      <div apple-content-edited="true" class="">
        <div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
          <div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
            <div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
              <div style="letter-spacing: normal; orphans: auto;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; widows: auto; word-spacing:
                0px; -webkit-text-stroke-width: 0px; word-wrap:
                break-word; -webkit-nbsp-mode: space;
                -webkit-line-break: after-white-space;" class="">
                <div class=""><i class=""><font class="" size="3">Cheers!</font></i></div>
                <div class=""><i class=""><font class="" size="3"><br class="">
                    </font></i></div>
                <div class=""><i class=""><font class="" size="3">Rick
                      Sarmento</font></i></div>
                <div style="font-size: 13px;" class="">SESE Astronomy/Astrophysics Grad Student</div>
                <div style="font-size: 13px;" class=""><a moz-do-not-send="true" href="mailto:rsarment@asu.edu" class="">rsarment@asu.edu</a></div>
                <div style="" class=""><br class="">
                </div>
              </div>
              <br class="Apple-interchange-newline">
            </div>
            <br class="Apple-interchange-newline">
          </div>
          <br class="Apple-interchange-newline">
        </div>
        <br class="Apple-interchange-newline">
        <br class="Apple-interchange-newline">
      </div>
      <br class="">
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
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>
    <br class="">
  </div>

_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>