<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Sushil,<div class=""><br class=""></div><div class="">What you can do currently is to get the data from fixed resolution buffer and make the plot with quiver callback in matplotlib. The following is a basic draft for this:</div><div class=""><br class=""></div><div class=""><div class="">L = [1, -1, 0]</div><div class="">north_vector = [0, 0, 1]</div><div class="">slc = yt.OffAxisSlicePlot(ds, L, 'cutting_plane_velocity_x', center=[0,0,0], width=(180,'km'), north_vector=north_vector)</div><div class=""><br class=""></div><div class=""># Now get the fixed resolution buffer</div><div class="">vel = slc._frb['velocity_magnitude’]</div><div class="">U = slc._frb['cutting_plane_velocity_x']</div><div class="">V = slc._frb['cutting_plane_velocity_y']</div><div class=""><br class=""></div><div class="">extentx = [slc.xlim[i].in_units('km') for i in (0, 1)]</div><div class="">extenty = [slc.ylim[i].in_units('km') for i in (0, 1)]</div><div class="">extent = extentx + extenty</div><div class=""><br class=""></div><div class="">x = np.linspace(extentx[0], extentx[1], vel.shape[0])</div><div class="">y = np.linspace(extenty[1], extenty[0], vel.shape[1])</div><div class=""><br class=""></div><div class="">X, Y = np.meshgrid(x, y)</div><div class=""><br class=""></div><div class="">normalize = True</div><div class="">if normalize is True:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>N = np.sqrt(U**2+V**2)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>U /= N</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>V /= N</div><div class=""><br class=""></div><div class="">norm = matplotlib.colors.LogNorm(vmin=vel.min(), vmax=vel.max())</div><div class="">factor = 40</div><div class=""><br class=""></div><div class="">plt.quiver(X[::factor, ::factor], Y[::factor, ::factor], U[::factor, ::factor], V[::factor, ::factor])</div><div class="">plt.imshow(vel.d, extent=extent, norm=norm)</div><div class="">plt.colorbar()</div><div class="">plt.savefig('quiver_plot.png')</div></div><div class=""><br class=""><div 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="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="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 class="">Best wishes,</div><div class="">--</div><div class="">Suoqing JI</div><div class="">Ph.D Candidate</div><div class="">Department of Physics</div><div class="">University of California, Santa Barbara</div><div class=""><a href="http://web.physics.ucsb.edu/~suoqing" class="">http://web.physics.ucsb.edu/~suoqing</a></div></div></div></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 30, 2016, at 4:04 PM, Sushilkumar <<a href="mailto:sushil.sush19us@gmail.com" class="">sushil.sush19us@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra">Dear Suoqing Ji:</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Thanks. In the meanwhile can you suggest any alternate function/method in yt that  I can use for my vector plots? </div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">I also have a 3d (streamlines_t000.png) and 2d streamline plot (UniformGridData_Slice_y_field_x_t000.png), which needs to treated in the same way. Can you suggest any approach for these plots?</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Drive link:</div><div class="gmail_extra"><a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" class="">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a><br class=""></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Thanks in advance</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Apr 30, 2016 at 12:56 PM,  <span dir="ltr" class=""><<a href="mailto:yt-users-request@lists.spacepope.org" target="_blank" class="">yt-users-request@lists.spacepope.org</a>></span> wrote:<br class=""><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">Send yt-users mailing list submissions to<br class="">
        <a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">
<br class="">
To subscribe or unsubscribe via the World Wide Web, visit<br class="">
        <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
or, via email, send a message with subject or body 'help' to<br class="">
        <a href="mailto:yt-users-request@lists.spacepope.org" class="">yt-users-request@lists.spacepope.org</a><br class="">
<br class="">
You can reach the person managing the list at<br class="">
        <a href="mailto:yt-users-owner@lists.spacepope.org" class="">yt-users-owner@lists.spacepope.org</a><br class="">
<br class="">
When replying, please edit your Subject line so it is more specific<br class="">
than "Re: Contents of yt-users digest..."<br class="">
<br class="">
<br class="">
Today's Topics:<br class="">
<br class="">
   1. Re: Camera/Off Axis Options (Suoqing Ji)<br class="">
<br class="">
<br class="">
----------------------------------------------------------------------<br class="">
<br class="">
Message: 1<br class="">
Date: Fri, 29 Apr 2016 12:35:04 -0700<br class="">
From: Suoqing Ji <<a href="mailto:suoqing@physics.ucsb.edu" class="">suoqing@physics.ucsb.edu</a>><br class="">
To: Discussion of the yt analysis package<br class="">
        <<a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a>><br class="">
Subject: Re: [yt-users] Camera/Off Axis Options<br class="">
Message-ID: <<a href="mailto:9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu" class="">9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu</a>><br class="">
Content-Type: text/plain; charset="us-ascii"<br class="">
<br class="">
Hi Sushil,<br class="">
<br class="">
I was able to reproduce your error and created an issue here: <a href="https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot" rel="noreferrer" target="_blank" class="">https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot</a> <<a href="https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot" rel="noreferrer" target="_blank" class="">https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot</a>><br class="">
<br class="">
Best wishes,<br class="">
--<br class="">
Suoqing JI<br class="">
Ph.D Candidate<br class="">
Department of Physics<br class="">
University of California, Santa Barbara<br class="">
<a href="http://web.physics.ucsb.edu/~suoqing" rel="noreferrer" target="_blank" class="">http://web.physics.ucsb.edu/~suoqing</a><br class="">
<br class="">
> On Apr 28, 2016, at 7:17 PM, Sushilkumar <<a href="mailto:sushil.sush19us@gmail.com" class="">sushil.sush19us@gmail.com</a>> wrote:<br class="">
><br class="">
> Dear Suoqing Ji:<br class="">
><br class="">
> With a combination of center [0,0,0] and adjusting the width w, I was able to eliminate all the warnings mentioned earlier. But the off axis slice plots still wont give me a desired result.<br class="">
><br class="">
> Plot available on the drive below below.<br class="">
><br class="">
> The two plots L(010),N(0,0,1).png and L(101),N(001).png are plotted for x-z plane and viewing angle of 45 degrees but both are drastically different from each other. In fact the off axis slice plots (L(101),N(001).png) is not in the x-z plane either.<br class="">
><br class="">
> I am aiming for a plot similar to vector_rotate.png which is same as vector_original.png but rotated/viewed at an angle.<br class="">
><br class="">
> The vector_rotate.png was created using the python image library. I was hoping if yt has any similar options with off axis which would tilt the vector plots and fill all the vector grids (which cannot be done using PIL).<br class="">
><br class="">
> The script (yt_velocity_fields.py) and sample data file (Expl_Bt101.mtx.tar.gz) is available on drive link for your reference.<br class="">
><br class="">
> Thanks in advance and my sincere apologies for repeated queries. But this is extremely critical in reproducing my result and putting it for publication.<br class="">
><br class="">
> <a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank" class="">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a> <<a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank" class="">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a>><br class="">
><br class="">
><br class="">
><br class="">
><br class="">
><br class="">
<br class="">
-------------- next part --------------<br class="">
An HTML attachment was scrubbed...<br class="">
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160429/cf49a1ce/attachment.html" rel="noreferrer" target="_blank" class="">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160429/cf49a1ce/attachment.html</a>><br class="">
<br class="">
------------------------------<br class="">
<br class="">
Subject: Digest Footer<br class="">
<br class="">
_______________________________________________<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="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class="">
<br class="">
------------------------------<br class="">
<br class="">
End of yt-users Digest, Vol 98, Issue 43<br class="">
****************************************<br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><span style="border-collapse:collapse" class=""><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px" class=""><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse" class=""><b class=""><i class="">SK<sup class="">2</sup></i></b></span></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px" class=""><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse" class=""><b class=""><i class=""><sup class=""><br class=""></sup></i></b></span></div><div class=""><span style="color:rgb(80,0,80);font-family:arial,sans-serif;border-collapse:collapse" class=""><b class=""><sup class="">"</sup></b></span><font color="#500050" face="arial, sans-serif" class=""><b class="">Claiming that something can move faster than light is a good conversation-stopper in physics. People edge away from you in cocktail parties; friends never return phone calls. You just don’t mess with Albert Einstein.</b></font><b style="color:rgb(80,0,80);font-family:arial,sans-serif" class=""><sup class="">"</sup></b></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px" class=""><br class=""></div></span></div>
</div></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>