You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm playing with a technique to do a polar 1D plot in VCS, and I ran into some issues along the way. The biggest issue is that attempting to use a projection on a secondary object (which is something the API supports) doesn't really work, at all.
I inserted some code to dump the attributes of the line object being generated for that template, and got this:
----------Line (Tl) member (attribute) listings ----------
secondary method = Tl
name = __line_591065525709696
type = ['solid']
width = [1.0]
color = [1]
priority = 1
viewport = [0.2766584621956789, 0.7233415266284211, 0.259999990463, 0.860000014305]
worldcoordinate = [-180.3333333325, 179.6666666625, -90.0, 90.0]
x = [[-180.3333333325, 179.6666666625], [-180.3333333325, 179.6666666625]]
y = [[90.0, 90.0], [-90.0, -90.0]]
projection = polar
colormap = None
I tried assigning those exact values to a line and plotting it, but it still failed to produce any output.
I dug into the VTK objects actually being assembled, iterated across all of the points created, and still, everything was the same for both ways. After a bunch of spelunking through misc. VTK objects, I discovered the the bounds on the actors were set differently.
I'm playing with a technique to do a polar 1D plot in VCS, and I ran into some issues along the way. The biggest issue is that attempting to use a projection on a secondary object (which is something the API supports) doesn't really work, at all.
A simple test case:
which gives you a blank canvas.
This seemed odd to me, since we do essentially that exact line when plotting a polar plot of a 2D variable (via the template.box1 attribute).
I inserted some code to dump the attributes of the line object being generated for that template, and got this:
I tried assigning those exact values to a line and plotting it, but it still failed to produce any output.
I dug into the VTK objects actually being assembled, iterated across all of the points created, and still, everything was the same for both ways. After a bunch of spelunking through misc. VTK objects, I discovered the the bounds on the actors were set differently.
It turns out that the
plot
function will try and grab a "vtk_backend_grid" and pass it to this code infitToViewport
; when we plot the template,vtk_backend_grid
is passed as a kwarg, but when we plot the line straight-up, we use theXrg
andYrg
values derived from theworldcoordinate
attribute on theline
object.We definitely need to be able to correctly project stuff without plotting a variable as part of the process, so this is in the "bug" category.
Migrated from: CDAT/cdat#1965
The text was updated successfully, but these errors were encountered: