Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The surfaces visualisation gets broken after plotting graph #201

Open
mshavliuk opened this issue May 7, 2023 · 1 comment
Open

The surfaces visualisation gets broken after plotting graph #201

mshavliuk opened this issue May 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mshavliuk
Copy link
Collaborator

Description

The surfaces visualisation gets broken after plotting graph

Steps to reproduce

  1. Import multicompartment_head_project
  2. Generate FEM mesh
  3. Generate Lead Field via zef_tes_lead_field; script
  4. Click "plot graph"
  5. Click "visualize surfaces"
  6. see the error
Property assignment is not allowed when the object is empty.  Use
subscripted assignment to create an array element.

Error in zef_update_colorscale (line 25)
    h.ColorScale = 'linear';

Error in zef_set_sliders_plot (line 6)
evalin('base','zef_update_colorscale;');

Error in zef_plot_meshes (line 1228)
        zef_set_sliders_plot(1);

Error in zef_visualize_surfaces (line 3)
zef_update_fig_details;zef_plot_meshes([]);
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

Expected behavior

The figure tool shows a correct visualization for surface model, no errors occur.

Screenshots

2023-05-07-11.13.04.mp4

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS MacOS
Shell N/A
@mshavliuk mshavliuk added the bug Something isn't working label May 7, 2023
@JoonasJL
Copy link
Collaborator

I have partially solved this two years ago. The way to solve this permanently is to define functions for initializing 3D visualization and initializing 2D graphs that are called at the beginning of an appropriate type of visualization. Some of the handle variables for 3D visualization can be found in ZI's initialization scripts and others from zef_visualize_surfaces, for example, and zeffiro_interface/plugins/GMMClustering/v2/m/zef_plot_GMM_amplitudes.m lines 101-125 do what was once needed to draw 2D graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants