<div dir="ltr">Dear Nathan,<div><br></div><div>I understand that annotate_ method is not effective on profile plot. I'm going to try the way you introduced me.</div><div>I have to finish my data analysis with yt in 2 weeks, so I cannot take much time to modify source code. I'm going to submit feature request on github issue tracker.</div><div><br></div><div>Thanks for your advice!</div><div><br></div><div>Sincerely,</div><div>Y.T.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-30 17:14 GMT-04:00 Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Right now unfortuantely ProfilePlot doesn't offer much in the way of customization. Your reading of the documentation is correct, none of the annotate_ methods are implemented for ProfilePlot. In principle we could implement them but up until now no one has taken on that project. Ultimately the reason this isn't easy is because ProfilePlot is not implemented using the same infrastructure as the other yt plot types so the "annotate_" methods don't get attached "for free" like the other plot types as part of their basic design. It's set up this way largely for historical reasons.<br><br></div>Anyway, to answer your question, here is an example notebook that explains how you might do what you want with ProfilePlot:<br><br><a href="https://gist.github.com/anonymous/012a0518c82c687a9c5bab861451ffd0" target="_blank">https://gist.github.com/anonym<wbr>ous/012a0518c82c687a9c5bab8614<wbr>51ffd0</a><br><br></div>This uses a couple of hacks and accesses some private functions inside of ProfilePlot and PlotMPL.<br></div><div><br></div><div>You may end up finding it more convenient to manually plot everything using matplotlib, as in this example:<br><br><a href="https://gist.github.com/anonymous/3c5c991a8ca32e17805acf61a697c68f" target="_blank">https://gist.github.com/<wbr>anonymous/<wbr>3c5c991a8ca32e17805acf61a697c6<wbr>8f</a><br><br></div>As-is ProfilePlot is a bit unflexible and isn't terribly easy to customize. That asid, there's probably a number of things we could do to make ProfilePlot a bit more flexible for your use case. In particular, we could add a way to overplot lines to a ProfilePlot and add a `set_font()` function to ProfilePlot. <br></div><div><br></div><div>Both of these would be relatively straightforward to add, I think. If you'd be interested in working on that let me know and I can give you pointers and point you at the relevant places you'd need to modify in the yt source code. If you're not interested in working on that, please feel free to file those feature requests as an issue on our github issue tracker. Unfortunately I can't commit to doing this myself as I have other things I need to concentrate on for yt.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Nathan<br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 30, 2017 at 2:48 PM, tyuta <span dir="ltr"><<a href="mailto:y0u1t1a5.t@gmail.com" target="_blank">y0u1t1a5.t@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear yt-users,<div><br></div><div>Hi, I want to annotate some lines on 1D profile plots, like on projection plots or slice plots. I looked through the yt documentation, and I found:</div><div><br></div><div><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px">Callbacks can be applied to plots created with </span><a class="m_-4609151185958214600m_2414625604633836987gmail-reference m_-4609151185958214600m_2414625604633836987gmail-internal" href="http://yt-project.org/doc/reference/api/yt.visualization.plot_window.html#yt.visualization.plot_window.SlicePlot" title="yt.visualization.plot_window.SlicePlot" style="box-sizing:border-box;background-color:transparent;color:rgb(69,130,236);text-decoration:none;font-family:Georgia,"Times New Roman",Times,serif;font-size:16px" target="_blank"><code class="m_-4609151185958214600m_2414625604633836987gmail-xref m_-4609151185958214600m_2414625604633836987gmail-py m_-4609151185958214600m_2414625604633836987gmail-py-class m_-4609151185958214600m_2414625604633836987gmail-docutils m_-4609151185958214600m_2414625604633836987gmail-literal" style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14.399999618530273px;padding:2px 4px;color:rgb(221,17,68);background-color:transparent;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;font-weight:bold;white-space:nowrap"><span class="m_-4609151185958214600m_2414625604633836987gmail-pre" style="box-sizing:border-box">SlicePlot</span></code></a><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px">, </span><a class="m_-4609151185958214600m_2414625604633836987gmail-reference m_-4609151185958214600m_2414625604633836987gmail-internal" href="http://yt-project.org/doc/reference/api/yt.visualization.plot_window.html#yt.visualization.plot_window.ProjectionPlot" title="yt.visualization.plot_window.ProjectionPlot" style="box-sizing:border-box;background-color:transparent;color:rgb(69,130,236);text-decoration:none;font-family:Georgia,"Times New Roman",Times,serif;font-size:16px" target="_blank"><code class="m_-4609151185958214600m_2414625604633836987gmail-xref m_-4609151185958214600m_2414625604633836987gmail-py m_-4609151185958214600m_2414625604633836987gmail-py-class m_-4609151185958214600m_2414625604633836987gmail-docutils m_-4609151185958214600m_2414625604633836987gmail-literal" style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14.399999618530273px;padding:2px 4px;color:rgb(221,17,68);background-color:transparent;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;font-weight:bold;white-space:nowrap"><span class="m_-4609151185958214600m_2414625604633836987gmail-pre" style="box-sizing:border-box">ProjectionPlot</span></code></a><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px"><wbr>, </span><a class="m_-4609151185958214600m_2414625604633836987gmail-reference m_-4609151185958214600m_2414625604633836987gmail-internal" href="http://yt-project.org/doc/reference/api/yt.visualization.plot_window.html#yt.visualization.plot_window.OffAxisSlicePlot" title="yt.visualization.plot_window.OffAxisSlicePlot" style="box-sizing:border-box;background-color:transparent;color:rgb(69,130,236);text-decoration:none;font-family:Georgia,"Times New Roman",Times,serif;font-size:16px" target="_blank"><code class="m_-4609151185958214600m_2414625604633836987gmail-xref m_-4609151185958214600m_2414625604633836987gmail-py m_-4609151185958214600m_2414625604633836987gmail-py-class m_-4609151185958214600m_2414625604633836987gmail-docutils m_-4609151185958214600m_2414625604633836987gmail-literal" style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14.399999618530273px;padding:2px 4px;color:rgb(221,17,68);background-color:transparent;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;font-weight:bold;white-space:nowrap"><span class="m_-4609151185958214600m_2414625604633836987gmail-pre" style="box-sizing:border-box">OffAxisSlicePlot</span></code></a><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px">, or </span><a class="m_-4609151185958214600m_2414625604633836987gmail-reference m_-4609151185958214600m_2414625604633836987gmail-internal" href="http://yt-project.org/doc/reference/api/yt.visualization.plot_window.html#yt.visualization.plot_window.OffAxisProjectionPlot" title="yt.visualization.plot_window.OffAxisProjectionPlot" style="box-sizing:border-box;background-color:transparent;color:rgb(69,130,236);text-decoration:none;font-family:Georgia,"Times New Roman",Times,serif;font-size:16px" target="_blank"><code class="m_-4609151185958214600m_2414625604633836987gmail-xref m_-4609151185958214600m_2414625604633836987gmail-py m_-4609151185958214600m_2414625604633836987gmail-py-class m_-4609151185958214600m_2414625604633836987gmail-docutils m_-4609151185958214600m_2414625604633836987gmail-literal" style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14.399999618530273px;padding:2px 4px;color:rgb(221,17,68);background-color:transparent;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;font-weight:bold;white-space:nowrap"><span class="m_-4609151185958214600m_2414625604633836987gmail-pre" style="box-sizing:border-box">OffAxisProjectionPlot</span></code></a><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px"> by calling one of the </span><code class="m_-4609151185958214600m_2414625604633836987gmail-docutils m_-4609151185958214600m_2414625604633836987gmail-literal" style="box-sizing:border-box;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14.399999618530273px;padding:2px 4px;color:rgb(221,17,68);background-color:rgb(249,242,244);border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;white-space:nowrap"><span class="m_-4609151185958214600m_2414625604633836987gmail-pre" style="box-sizing:border-box">annotate_</span></code><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px"> methods that hang off of the plot object.</span><br></div><div><span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px"><br></span></div><div>on plot modification page, which means annotate_line method is not effective for profile plots (I actually tried this on profile plots, and it did not work). Is there any good way to annotate lines on 1D profile plots?<span style="color:rgb(51,51,51);font-family:Georgia,"Times New Roman",Times,serif;font-size:16px"><br></span></div><div>Also, I want to change the fontsize of numbers and labels on the axes of profileplots. How can I do this?</div><div>For example, I want to annotate vertical line on density=1e-25, and change the fontsize of "density", "10**-28", ..., "10**-21".</div><div><br></div><div>Thanks,</div><div>Y.T.</div><div><img src="cid:ii_15f6ecda24ebf61b" alt="埋め込み画像 1" width="426" height="341"></div></div>
<br></div></div>______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>