<div dir="ltr">Hi Manuel,<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 9:51 AM, Manuel Zamora <span dir="ltr"><<a href="mailto:mzamora06@gmail.com" target="_blank">mzamora06@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Dear YT community,</div><div><br></div><div> I'm using the annotate_velocity() and annotate_magnetic_field() routines for ‘quiver' plots,</div><div>but I also want to stamp the scale of the vectors in the same plot. Could anyone point me</div><div>to the respective documentation?</div></div></blockquote><div><br></div><div>Unfortunately the functionality you're talking about hasn't been implemented.</div><div><br></div><div>I can think of three ways to produce the plot you're looking for:</div><div><br></div><div>* Create the plot manually in your favorite plotting library, using image arrays produced using yt's FixedResolutionBuffer object:</div><div><br></div><div><a href="http://yt-project.org/doc/visualizing/manual_plotting.html">http://yt-project.org/doc/visualizing/manual_plotting.html</a><br></div><div><br></div><div>* Manipulating the SlicePlot or ProjectionPlot to draw a scale arrow manually.  This will require manipulating the matplotlib figure and axes objects that are attached to the yt plot object. These doc entries illustrate how to manually customize yt's plots:</div><div><br></div><div><a href="http://yt-project.org/doc/visualizing/plots.html?highlight=figure#further-customization-via-matplotlib">http://yt-project.org/doc/visualizing/plots.html?highlight=figure#further-customization-via-matplotlib</a><br></div><div><a href="http://yt-project.org/doc/cookbook/simple_plots.html#matplotlib-primitives">http://yt-project.org/doc/cookbook/simple_plots.html#matplotlib-primitives</a><br></div><div><br></div><div>* By modifying the QuiverCallback to optionally draw a scale marker.  The QuiverCallback is defined in plot_modifications.py, a file that lives in the yt source distribution: </div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/src/0f7b97ccc551773ca725ba3209d0364b391793af/yt/visualization/plot_modifications.py?at=yt">https://bitbucket.org/yt_analysis/yt/src/0f7b97ccc551773ca725ba3209d0364b391793af/yt/visualization/plot_modifications.py?at=yt</a></div><div><br></div><div>All three options will require a bit of code to get working properly.  I'd personally go with the third option, since it will make this task trivial for others who have the same problem in the future.  The QuiverCallback code is pretty straightforward and I don't think a deep understanding of yt's internals would be necessary to do this. If you choose to go down this route, we'd love to include your patch into yt and I'd encourage you to consider submitting a pull request to the yt bitbucket repository.</div><div><br></div><div>Sorry I couldn't give an easy answer - unfortunately there's lots of low-hanging fruit like this in yt's plotting and visualization code, but since we're all doing research as our day jobs, more or less, it's hard to justify adding features before people actually need it for a project.  Generally yt features, especially in the plotting code, get implemented as people happen to need them in their research.</div><div><br></div><div>Best,</div><div><br></div><div>-Nathan</div><div> </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div> Thanks a lot for your kind help!</div><div><br></div><div> Cheers :)</div><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>_</div><span class=""><font color="#888888"><div><span style="text-align:-webkit-auto">Manuel Zamora</span></div></font></span></div></div>
</div>
<br></div><br>_______________________________________________<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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div>