<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Rick,<br>
      <br>
      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>
      (i) use annotate_text calls, or<br>
      (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>
      <br>
      Both methods are demonstrated here:
nbviewer.ipython.org/github/astrosmith/Notebooks/blob/master/set_title.ipynb<br>
      <br>
      Cheers,<br>
      Aaron<br>
      <br>
      <br>
      On 10/28/14, 4:39 PM, Rick Sarmento wrote:<br>
    </div>
    <blockquote cite="mid:2D59C04E-A551-494F-B462-D7DDE371E575@asu.edu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      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="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 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="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 moz-do-not-send="true"
                    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="">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <br>
  </body>
</html>