Do ILNumerics .NET Visualization Engine support the following features regarding 3D surface chart? - ilnumerics

I would like to know whether the following features are supported in .NET Visualization Engine of ILNumerics
Draw a 3D Surface Plot
Layout a wireframe over the Surface Plot
Draw a scatter plot over the Surface Plot
Color the surface using custom values and show the color bar as a legend.
Custom meshgrid with support for floating point values.
Able to Zoom, Pan and Rotate the plot
Tooltip support together with the ability to select a point from the Surface plot (maybe using mouseclick/crosshair etc). I need a callback function from the point selected.
Modify axis properties such ticks, labels, titles etc.
Lighting and Shading options in the chart.
Please do reply

Yes, all is supported. Start with the visualization documentation: http://ilnumerics.net/Visualization-API.html
The examples section contains many runnable examples, including this one dealing with mouse picking on 3D surface plots.

Related

How to plot two 2D histograms on the same 2D image?

I wonder if anyone can help me to plot two 2D histograms on the same plot.
I do some lifetime imaging and I want to reproduce my result as histograms (phasor plot method). I know how to plot a single 2D histogram, but not more, without removing the preceding one.
I am currently using the DIPimage toolbox, but I have seen that for plotting 2D histograms you can use as well the function 'ndhist'.
Please, find attached the picture. This is not obviously what I am after, as the background should be all blue and I would like to plot more 'clouds' over the universal circle.

Two surf plots on one figure

I want to plot on top of one surf graph another surf graph. This is the code.
x1=0:0.01:1;
y1=0:0.01:1;
[X,Y]=meshgrid(x1,y1);
Z=(X.*Y)./(X+Y-(X.*Y));
surf(X,Y,Z)
hold on;
[X1,Y1]=meshgrid(x,y);
Z1=(X1.*Y1)./(X1+Y1-(X1.*Y1));
surf(X1,Y1,Z1,'FaceColor', 'black','EdgeColor','none');
And in the graph I get how can I make the surf(X1,Y1,Z1,'FaceColor', 'black','EdgeColor','none'); more visible. In working with plots there's the option to change marker size and marker type. Is there are a similar thing for surf graph?
In the graph below I want to make the circled area more visible. Is there a way like to increase the marker size in surf graphs? Or to reduce the colour of the first surf plot a bit.

How to get vertical Z axis in 3D surface plot of Matplotlib?

I am plotting some data as a 3D surface plot using Matplotlib. The code I am using is pretty similar to this 3D surface plot example. It generates the plot shown below:
The problem with this plot is that the Z-axis is not vertical. How do I make the Z-axis vertical?
I examined the different API available and found view_init. By setting a low elevation (elev=1) of the plot using view_init, I can get the Z-axis to be vertical, as shown below:
However, the problem here is that at low elevation the Y axis tick labels are all overwritten and cannot be viewed correctly. So I need the plot to be at a high elevation and with the X-Y plane rotation angle as shown in Figure 1. How do I achieve a vertical Z-axis for this plot?
I do not know Matlab, but I know Matplotlib is derived from the Matlab API. So, I looked at surface plot examples in Matlab documentation and found that the Z-axis seems to be vertical in their examples. One figure for illustration with high elevation is shown below:
Update 1: Based on Bentoy13's suggestion, I set view_init(elev=30, azim=-37.5) and got the below result. It is better, but not yet vertical:
In comparison, Z-axis in Matlab plot is perfectly vertical. Also, as is visible from this angle, I cannot actually use this azim=-37.5 since some information is hidden. Any other solution? :-)
In MPL 2.1.01 they added the option to manually override the projection to generate your 3d graph with an orthographic projection; simply insert the following line into your script:
ax.set_proj_type('ortho')
[Example from MPL source 1]
1 https://matplotlib.org/users/prev_whats_new/whats_new_2.1.0.html
In the examples given in the Matlab documentation, surface plots are often viewed in a special position which is given by the command view:
view(3)
The command view sets the viewpoint of the axes. According to the doc, view(3) sets the default three-dimensional view with azimutal = –37.5 and elevation = 30.
EDIT
The problem of having a vertical z-axis is not that the axis is vertical, but is a problem of perspective. By default, Matlab plots 3D surfaces with a orthographic projection, but matplotlib seems to draw with perspective projection. Sadly matplotlib doesn't provide an API for setting this...
EDIT 2
It appears that the following patch is very useful to draw 3D in orthographic projection:
import numpy
from mpl_toolkits.mplot3d import proj3d
def orthogonal_proj(zfront, zback):
a = (zfront+zback)/(zfront-zback)
b = -2*(zfront*zback)/(zfront-zback)
return numpy.array([[1,0,0,0],
[0,1,0,0],
[0,0,a,b],
[0,0,0,zback]])
proj3d.persp_transformation = orthogonal_proj
I take no credit for this patch, you can find it here.

How to define Matlab Bar3 DisplayName for individual surface objects

I have a series of histograms being plotted along side each other in a bar3 plot. I'd like to take advantage of the plot browser to turn on and off various histograms so I can do side by side comparisons. You can see from the properties Inspector that I've altered the display name for one such surface, the third, that is being updated in the legend but not in the property browser.
There's also a misregistration of the colors you see in the legend to that of the actual plot. The legend is accurate only when I have all surfaces checked for display.
I'm using MATLAB Version 7.13.0.564 (R2011b)
Thanks for helping
Toggle the legend off and on with legend('off') followed by legend('show'). Try also legend('toggle').

How to draw an isosurface in the same figure with a scatter3 plot in matlab?

I have a 3D volume and a 3D point cloud. How can I draw the point cloud, along with an isosurface of the volume, without overwriting the scatter plot? Using patch to draw the isosurface always wipes away the scatter3 plot.
Some things to try.
Draw the surface use patches first. (h = patch(...), then set hold on)
Make the patches semi-transparent. This will let you see if the scatter items are still there, just hidden. It also tells the renderer that everything needs to be plotted, which can prevent some sorts of graphics bugs.
set(h,'faceAlpha',0.5)
Try using plot3 instead of scatter3. This does not allow you to change individual marker sizes or colors, but it is much easier on Matlab. Even if you need the scatter3 features, this is worth trying as a debugging step.