How to put hit test off to Isosurface in matlab?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am using the code
isosurface(foo,fo);
caxis([0.2 0.5])
colorbar
grid on; axis equal; colormap default; alpha(0.3);
hold on;
I would want to make the hit test off to the isosurface so that, by clicking on the figure ButtonDownFcn of axis can be called.
0 commentaires
Réponse acceptée
Jan
le 14 Juil 2013
Modifié(e) : Jan
le 14 Juil 2013
You can call patch explicitly to define additional properties:
patch(isosurface(foo,fo), 'HitTest', 'off');
5 commentaires
Jan
le 15 Juil 2013
Modifié(e) : Jan
le 15 Juil 2013
So did you read doc isosurface already? There you find the exact description of how to provide the outputs of isosurface to patch (see "Example 2"):
[faces, verts, colors] = isosurface(foo, fo);
patch('Vertices', verts, 'Faces', faces, ...
'FaceVertexCData', colors, ...
'FaceColor','interp', ...
'edgecolor', 'interp', ...
'HitTest', 'off'); % <-- individual changes
If this does not help already, look at the other examples in the documentation.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

