Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab Persistent plot legend error in recent install of R2015b

  1. Jul 14, 2016 #1
    Hey PFers. I recently did an install of Matlab R2015b on a x64 Windows 10 PC. It doesn't matter what I plot or how I plot it (e.g., plot(), scatter(),etc.), when I use the figure dropdown menu Insert→Legend I get the following error
    Code (Text):
    Error using assert
    Too many input arguments.

    Error in matlab.graphics.shape.internal.AxesLayoutManager.getManager

    Error in legendcolorbarlayout (line 19)
    hManager  = matlab.graphics.shape.internal.AxesLayoutManager.getManager(hAx);

    Error in matlab.graphics.illustration.Legend/setAxesImpl

    Error in matlab.graphics.illustration.Legend/set.Axes_I

    Error in matlab.graphics.illustration.Legend/set.Axes

    Error in legend>make_legend (line 332)
    leg.Axes = ha;

    Error in legend (line 233)
                [h,msg] = make_legend(ha,args(arg+1:end),version);

    Error in insertmenufcn (line 58)
                        leg = legend(cax,'show');
    Error while evaluating Menu Callback
    I've googled a bit, but there seem to be many ways to generate these errors. The only reliable fix from MATLAB support is to reset the path to default, but this isn't an option when it comes to running my code.

    Has anyone experienced this and found a fix that doesn't mess with the path? Thanks!
  2. jcsd
  3. Jul 16, 2016 #2
    Why is that not an option? You can always call restoredefaultpath and then just set your custom path afterwards.
  4. Jul 18, 2016 #3
    Thanks, I tried that. It seems to happen after I add anything to the default path. I've gone through everything in the added directories to make sure there weren't any functions sharing names with MATLAB defaults.

    I'm probably just going to use another PC (also x64 and same OS) that doesn't seem to have the problem. *shrugs*
  5. Jul 18, 2016 #4
    Try the command

    Code (Text):

    opengl software
    If that doesn't work, try searching the MATLAB Answers forum for various terms in your error message, for example http://www.mathworks.com/matlabcentral/answers/?term=AxesLayoutManager
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Persistent plot legend error in recent install of R2015b
  1. Legend, mathematica (Replies: 9)

  2. MATLAB plotting error? (Replies: 0)