New in ParaView: Axes Grid Annotation

We've been working on a new evolution of the mechanism to annotate the coordinate axes in 3D views for ParaView. This will eventually replace the Cube Axes in ParaView. For this post, I will stick with sharing a series of screenshots demonstrating the functionality. The plan is to include the details on how to use this new Axes Grid annotation in The ParaView Guide for the next release of ParaView.

Just to remind us of what the Cube Axes currently looks like, here a little refresher. (This may be a little unfair, but hey! I am promoting new developments here, I have to make the reader want, nay need the new stuff!)

 

Now, here's the new Axes Grid. The name is a little weird, but if anyone has any suggestions, I am all ears! It uses dynamic labelling for the axes labels (similar to what the chart view like Bar Chart and Line Chart do). It also tries to place labels at pretty locations. Thus, despite the Z axis bounds being a [-10, 10.2], the axis decides to label -10 and +10.

 

Of course, no ParaView user will be happy without complete control of pretty much everything! Fret not! You can pick which faces of annotate (here, we're labelling only the min-XY face), which axes to label (here, we're picking not to label the axis with Y=min), where to place the labels (here, the X axis is labelled explicitly at 2.5, 0.5, -0.5, and -4.5), as well as individual text properties for each of the axes titles and labels. Also note that we can now use Mathtext in axes titles — similar to the chart views.

 

The default setting is to keep the grid behind the data always i.e. cull the front faces, but you can change that too. Here, the dynamic face culling is entirely disabled and we are annotating a specific face.

 

Now, we pick 2 faces to annotate without dynamic culling. Also notice the changed axes titles as well as different title, and label text properties for each of the axes — nothing too fancy there.

 

Similar to the Cube Axes's default, you can hide the grid and just show the ticks.

 

Finally, here's the Axes Grid in action for the case when we have a change-of-basis matrix provided.

 

Here's the dialog showing some of the configuration options available for setting up the Axes Grid. There are quite a few knobs to twiddle, but remember, once you have the axes looking just right, you can save your preferences for later so you don't have to keep on messing with these options. Just click on the Save current settings values as default button at the bottom of the dialog to save current settings.

 

 A few caveats:

  • The Axes Grid currently requires that it wraps around all 3D geometry in the scene. Hence, you cannot show the grid for a specific dataset alone in the 3D view, it's always for the entire scene.
  • The Axes Grid doesn't shrink as one zooms in — this is a feature we'd like to add soon, however.
  • The Axes Grid doesn't support anchoring at the origin i.e. fix axes planes at the origin rather than the bounds.

The changes will be merged into ParaView master branch soon. Those who are interested in checking out the code before it lands can check out this merge request on ParaView's GitLab.

Update 2015/04/06: The is now available in ParaView master branch as of revision v4.3.1-401-g196623f.

 

11 Responses to New in ParaView: Axes Grid Annotation

  1. Marcus Hanwell says:

    Very nice, it looks like a great improvement and I am looking forward to seeing it merged into master soon!

  2. Aashish Chaudhary says:

    Looks great!! would be nice to have anti-aliasing included in the future.

  3. Ondřej Čertík says:

    > Now, here’s the new Axes Grid. The name is a little weird, but if anyone has any suggestions, I am all ears!

    Why not to just call it Axes?

  4. Alexander Neundorf says:

    Looks good 🙂

    Still a …and a few more wishes 🙂
    – minor ticks would be nice too
    – related to your first point, having multiple of these axes in a scene would be nice too, e.g. to have one set of axes around each object

  5. Utkarsh Ayachit says:

    @Ondrej Axes seems too generic there’s already Axes source in ParaView. Plus Axes would easily be confused with Center Axes :/.

    @Alex I am a little biased against minor ticks. I am not sure they really add much information to the view but I can be easily persuaded. In any case, if vtkAxis start supporting minor ticks, the Axes Grid can support those just as easily. The multiple axes part, alas, is more tricky than it sounds, esp in client-server.

  6. Christophe Bourcier says:

    Nice feature. It looks prettier and more readable than the Cube Axes.

    Can you add the possibility to display the min/max for each direction? Some users use the cube axes to know the bounding box values, in complementary to read the values in the information panel.

    Thanks.

  7. Utkarsh Ayachit says:

    @Christophe Makes sense. Shouldn’t be too hard to add that. I’ll put that on the TODO list.

  8. Ray Gomez says:

    Nice improvement over the standard CubeAxes.

    Installed this new revision on an OS X 10.9.5 system without any problems.

    Any hints on how to enable AxesGrid in pvbatch would be appreciated. Trace in paraview isn’t picking up the command to toggle it on, only the modified parameters are in the trace.

  9. Utkarsh Ayachit says:

    @Ray, good catch! I missed that. Here’s a commit that’ll fix the tracing as well as accessing the Axes Grid in Python.

    https://gitlab.kitware.com/paraview/paraview/merge_requests/48

    Once this change lands, you can access the Axes Grid in Python as follows:

    # get active view
    renderView1 = GetActiveViewOrCreate(‘RenderView’)
    # uncomment following to set a specific view size
    # renderView1.ViewSize = [904, 796]

    # Properties modified on renderView1.AxesGrid
    renderView1.AxesGrid.Visibility = 1

    # Properties modified on renderView1.AxesGrid
    renderView1.AxesGrid.XTitle = ‘X Title’
    renderView1.AxesGrid.XTitleBold = 1

  10. Utkarsh Ayachit says:

    @Ray Python trace fixes are now in git/master. Feel free to test them out. Thanks!

  11. Ray Gomez says:

    Python trace fixes worked for me. Thanks for the fixes.

    For larger font sizes the titles can overlap the labels. Might be helpful to have an offset or a check for overlapping fonts.

    Any idea when this will make it into a super build?

Questions or comments are always welcome!