New issue 1214: vector annotation of off-axis plot generates inconsistent result https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-ax...
Suoqing Ji:
Test dataset is here
Test script:
#!python
import yt
import numpy as np
dims = (200,200,200)
x = np.load('data.npy')
field1 = x[:,2].reshape(dims, order="F")
field2 = x[:,1].reshape(dims, order="F")
field3 = x[:,0].reshape(dims, order="F")
data = dict(velocity_x = field1,
velocity_y = field2,
velocity_z = field3)
bbox = np.array([[-100, 99], [-100, 99], [-100, 99]])
ds = yt.load_uniform_grid(data, dims, 'km', bbox=bbox, nprocs=1)
L = [0, -1, 0]
north_vector = [0, 0, 1]
slc1 = yt.OffAxisSlicePlot(ds, L, 'velocity_x', center=[0,0,0], width=(180,'km'),
north_vector=north_vector)
slc1.annotate_velocity(factor=40, normalize=True)
slc1.save()
L = [0, 1, 0]
north_vector = [0, 0, 1]
slc2 = yt.SlicePlot(ds, L, 'velocity_x', center=[0,0,0], width=(180,'km'),
north_vector=north_vector)
slc2.annotate_velocity(factor=40, normalize=True)
slc2.save()
On-axis plot:

Off-axis plot:
