Lead-DBS
  • Home
  • About
    • Quickstart Primer (Post-OP MR-Scans)
    • Data & Code inclusion philosophy
    • Quickstart Primer (Post-OP CT-Scans)
    • Deep Brain Stimulation
    • Lead Connectome
    • Publications
    • List of Lead-DBS dependencies
    • Citing Lead-DBS
  • News
  • Contact
  • Help/Support
    • Manual
    • Knowledge Base
      • Atlases/Resources
        • Subcortical Atlases (MNI-Space)
        • Cortical Atlas Parcellations (MNI-Space)
        • Macaque Atlases (MNI-Space)
        • The DISTAL atlas
        • FEM-based VTA model
        • Normative Connectomes
      • Lead-DBS Methods
        • Subcortical Electrophysiology Mapping (SEM)
        • AC/PC to MNI conversion
        • Connectivity Benefit Mapping
      • Other Videos
      • Screenshots
      • Walkthrough-Videos
    • Slack User Channel
    • Forum
  • Workshops
    • Past workshops
      • Berlin 2016
      • Shanghai September 2018
      • Hamburg February 2019
    • Berlin September 2019
    • Machine Learning – Berlin September 2019
    • Brisbane February 2020
  • Download
  • Lead-Connectome
  • Search
  • Menu Menu

Write out 2D: Error using plot

You are here: Home1 / Forums2 / Support forum ARCHIVED – Please use Slack Channel instead3 / Write out 2D: Error using plot4

Tagged: bug, plot, visualization

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • 06/06/2017 at 10:02 AM #2713
    tsieger
    Participant

    Hi,
    first of all, I must express my deep admiration for LeadDBS – running it for the first time, I could not believe that it is written in Matlab (so great features, graphics, and interactivity!).

    Let me ask a question regarding the “Write out 2D” feature. When I try to “Write out 2D” after I successfully finished all the preceding steps (and could even “Render 3D”), a transversal slice appears with some contour superimposed on it, but then the code fails with:

    Exporting 2D slice output...
    Electrode(s) k0, tra view: z = -10.9844 mm.
    Error using plot
    Color value must be a 3 element vector
    Error in ea_add_overlay (line 175)
                                    plot(cscale(1,:),cscale(2,:),'color',options.d2.con_color);
    Error in ea_writeplanes (line 177)
                    cuts=ea_add_overlay(boundboxmm,cuts,tracor,options);
    Error in ea_write (line 38)
        cuts=ea_writeplanes(options);
    Error in ea_autocoord (line 200)
            ea_write(options)
    Error in ea_run (line 95)
                        ea_autocoord(options);
    Error in lead_dbs>run_button_Callback (line 190)
    ea_run('run',options);
    Error in gui_mainfcn (line 95)
            feval(varargin{:});
    Error in lead_dbs (line 43)
        gui_mainfcn(gui_State, varargin{:});
    Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)lead_dbs('run_button_Callback',hObject,eventdata,guidata(hObject)) 
    Error while evaluating UIControl Callback

    The problem is that options.d2.con_color is a single number, not a vector of length 3, as expected by plot. Not sure whether this is a matlab problem, or I have misconfigured something?

    I’m using LeadDBS 1.6.3.4 (no update available) and the same problem can be reproduced using the current devel version from GitHub.
    My matlab version: R2016a (9.0.0.341360) 64-bit (glnxa64).

    Best,
    Tomas

    06/06/2017 at 11:39 AM #2716
    ningfei
    Keymaster

    Hi Tomas,

    Thank you for the kind words!

    Could try the following steps to see if it solves your problem?
    0. Clike the “2D Settings” button
    1. In the popup “Specify 2D Output Options” window , click “Contour Colors” button
    2. In the popup “Color” window, click “OK”
    3. Back to “Specify 2D Output Options” window, click “Save and Close”
    4. Try again to see if it works.

    You may also want to apply the hotfix (which is updated several times a day) to update LEAD to latest pre-release version. It might also solve some issues. To do so, you could either use “Apply Hotfix” from “Install” menu, or download the hotfix from here and then extract it to LEAD directory.

    Best,
    Ningfei

    06/06/2017 at 1:14 PM #2719
    tsieger
    Participant

    Hi Ningfei,
    thanks for your quick reply. Yes, the steps you suggested resolved the issue.

    (And the hotfix I applied later on also solved this warning, which appeared after setting the color manually:

    “Warning: The LineSmoothing property will be removed in a future release.
    > In ea_writeplanes (line 316)

    )

    Thanks a lot!

    best,
    Tomas

    06/06/2017 at 1:19 PM #2720
    andreashorn
    Keymaster

    Glad that it works! Re warnings, these can usually be safely ignored. We are a bit lazy in getting rid of warnings – so they are usually totally fine/planned in Lead-DBS.
    Have fun!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Support forum ARCHIVED – Please use Slack Channel instead’ is closed to new topics and replies.

Your Account

Log In
Register

Forum Statistics

Registered Users
130
Forums
1
Topics
185
Replies
607
Topic Tags
81

Subscribe to our newsletter

Latest Tweets

  • Tweet Avatar
    leaddbs
    @leaddbs
    Interesting single center case series with CM + ANT-DBS vs. CM-DBS only in 16 children and adults with drug-resista… https://t.co/0gzbgQlHud

    22h
  • Tweet Avatar
    leaddbs
    @leaddbs
    RT @RMarkRichardson: Thanks to @AlanBushPhD and @brainmodlab, this project to map perception of olfaction and taste with iEEG is already… https://t.co/AoPgkdzFUh

    22h
  • Tweet Avatar
    leaddbs
    @leaddbs
    RT @MarcCoutanche: Sharing my response to a recent review request from Nature Neuroscience. If you submit to a Nature journal, your se… https://t.co/bvxXH27RdV

    2d

Recent Posts

  • Lead-DBS on the cover of NeuroImage
  • Lead-DBS on the cover of Biological Psychiatry
  • Lead-DBS on the cover of Annals of Neurology
  • Crucial methodological updates for Lead-DBS
  • 2nd Lead-DBS Workshop in Shanghai, China

Archives

  • September 2020
  • June 2019
  • November 2018
  • September 2018
  • August 2018
  • March 2018
  • November 2017
  • September 2017
  • July 2017
  • April 2017
  • July 2016
  • June 2016
  • May 2016
  • March 2016
  • December 2015
  • November 2015
  • April 2015
  • January 2015
  • December 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014

Impressum & Datenschutzerklärung

Scroll to top