You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
cannot plot (Warning: The Position specified is invalid)
2 views (last 30 days)
Show older comments
DIA Matlab License manager
on 9 Oct 2018
Suddenly, I'm no longer able to plot, or create figures. When I issue one of the following commands
hold on
or
figure
or
plot(1,1) % just to plot a point
I get the following warning:
Warning: The Position specified is invalid
a figure window is then created, as in the figure, but no plots are created in it.
11 Comments
Adam
on 9 Oct 2018
Have you tried restarting matlab?
You may want to try:
rehash toolboxcache
on command line also.
Alessandro Cuttin
on 9 Oct 2018
Can't say why, but suddenly Matlab seemed broken (just creating a variable a=1 caused an error to be displayed), so I re-installed it. This plot problem still persists, also after restarting the program.
Alessandro Cuttin
on 9 Oct 2018
The problem still persists
>> close all
>> rehash toolboxcache
>> hold on
Warning: The Position specified is invalid
> In hold (line 37)
Alessandro Cuttin
on 9 Oct 2018
btw: I'm the one who asked the question, It's just that now I'm using my personal account, rather than the institutional one.
Adam
on 9 Oct 2018
What does
which figure -all
show?
Have you written any of your own functions using the same names as builtins such as figure, hold, plot?
Alessandro Cuttin
on 9 Oct 2018
>> which figure -all
built-in (/opt/MATLAB/R2018a/toolbox/matlab/graphics/figure)
>>
I do have one function in the script I'm currently working on, but reserved names like figure, hold and plot are not used. The warning is issued even if the workspace is empty.
Jan
on 9 Oct 2018
Edited: Jan
on 9 Oct 2018
Where does the warning come from? Use the debugger to check this:
dbstop if warning
If "a=1 caused an error" then please post the error message.
Whenever a description contains the term "suddenly", the user has changed something important, that he was not aware of. It might be the default units of figures in your case. If you re-install Matlab, the contents or the preferences folders is not changed: prefdir. Try to rename the preferences and check, if Matlab works after an automatic recreation.
In addition a user-defined startup.m file is not cleared also, but there you might find a re-definition of the factory or default properties of figures. But why "a=1" causes errors is mysterious. Maybe this gets clear, if you show us the message.
Alessandro Cuttin
on 9 Oct 2018
In response to @Steven, these are the output:
>> clear all
>> which -all gca
built-in (/opt/MATLAB/R2018a/toolbox/matlab/graphics/gca)
>> which -all axes
built-in (/opt/MATLAB/R2018a/toolbox/matlab/graphics/axes)
>> which -all get
built-in (/opt/MATLAB/R2018a/toolbox/matlab/graphics/get)
get is a built-in method % matlab.ui.internal.mixin.Printable method
get is a built-in method % matlab.ui.internal.mixin.Windowable method
get is a built-in method % matlab.ui.Figure method
get is a built-in method % matlab.ui.internal.mixin.AutoResizable method
get is a built-in method % matlab.ui.internal.mixin.AxesLimits method
get is a built-in method % matlab.ui.internal.mixin.Legacy method
get is a built-in method % matlab.ui.internal.mixin.FontRenderable method
get is a built-in method % matlab.ui.internal.mixin.KeyInvokable method
get is a built-in method % matlab.ui.internal.mixin.NoMarginsUnitsOnlyPositionable method
get is a built-in method % matlab.ui.internal.mixin.Positionable method
get is a built-in method % matlab.ui.internal.mixin.Selectable method
get is a built-in method % matlab.ui.internal.mixin.TerminalStateRepresentable method
get is a built-in method % matlab.ui.Root method
get is a built-in method % matlab.ui.control.ClientComponent method
get is a built-in method % matlab.ui.control.Component method
get is a built-in method % matlab.ui.container.Container method
get is a built-in method % matlab.ui.container.CanvasContainer method
get is a built-in method % matlab.ui.control.WebComponent method
get is a built-in method % matlab.ui.control.UIControl method
get is a built-in method % matlab.ui.container.Menu method
get is a built-in method % matlab.ui.container.toolbar.PushTool method
get is a built-in method % matlab.ui.container.toolbar.ToggleSplitTool method
get is a built-in method % matlab.ui.container.toolbar.ToggleTool method
get is a built-in method % matlab.ui.internal.mixin.UIToggleToolMixin method
get is a built-in method % matlab.ui.internal.mixin.UIToolMixin method
get is a built-in method % matlab.ui.container.Toolbar method
get is a built-in method % matlab.graphics.Graphics method
get is a built-in method % matlab.graphics.GraphicsPlaceholder method
get is a built-in method % matlab.graphics.internal.GraphicsPropertyHandler method
get is a built-in method % matlab.graphics.internal.ReferenceObject method
get is a built-in method % matlab.graphics.mixin.GraphicsPickable method
get is a built-in method % matlab.graphics.mixin.Mixin method
get is a built-in method % matlab.graphics.mixin.NodeChildren method
get is a built-in method % matlab.graphics.mixin.NodeParent method
get is a built-in method % matlab.graphics.mixin.Pickable method
get is a built-in method % matlab.graphics.mixin.Selectable method
get is a built-in method % matlab.graphics.internal.GraphicsBaseFunctions method
get is a built-in method % matlab.graphics.internal.GraphicsUIProperties method
get is a built-in method % matlab.graphics.internal.GraphicsCoreProperties method
get is a built-in method % matlab.graphics.internal.Legacy method
get is a built-in method % matlab.mixin.SetGet method
get is a built-in method % hgsetget method
get is a Java method % java.util.ArrayList method
get is a Java method % java.util.AbstractList method
get is a Java method % java.util.List method
get is a built-in method % matlab.graphics.primitive.canvas.JavaCanvasFactory method
get is a built-in method % matlab.graphics.primitive.canvas.JavaCanvas method
get is a built-in method % matlab.graphics.axis.AbstractAxes method
get is a built-in method % matlab.graphics.axis.Axes method
get is a built-in method % matlab.graphics.axis.decorator.AxisDecoration method
get is a built-in method % matlab.graphics.axis.decorator.AxisRulerBase method
get is a built-in method % matlab.graphics.axis.decorator.Backdrop method
get is a built-in method % matlab.graphics.axis.dataspace.CartesianDataSpace method
get is a built-in method % matlab.graphics.axis.colorspace.ColorSpace method
get is a built-in method % matlab.graphics.axis.dataspace.DataSpace method
get is a built-in method % matlab.graphics.axis.decorator.DecorationContainer method
get is a built-in method % matlab.graphics.axis.colorspace.MapColorSpace method
get is a built-in method % matlab.graphics.axis.decorator.NumericRuler method
get is a built-in method % matlab.graphics.axis.PlotTarget method
get is a built-in method % matlab.graphics.axis.PlotTargetManager method
get is a built-in method % matlab.graphics.axis.decorator.Ruler method
get is a built-in method % matlab.graphics.axis.camera.Camera method
get is a built-in method % matlab.graphics.axis.camera.Camera3D method
get is a built-in method % matlab.graphics.mixin.AxesParentable method
get is a built-in method % matlab.graphics.mixin.Background method
get is a built-in method % matlab.graphics.mixin.HintConsumer method
get is a built-in method % matlab.graphics.mixin.LegendTarget method
get is a built-in method % matlab.graphics.mixin.UIParentable method
get is a built-in method % matlab.graphics.primitive.world.ClipNode method
get is a built-in method % matlab.graphics.primitive.world.Geometry method
get is a built-in method % matlab.graphics.primitive.world.LightSource method
get is a built-in method % matlab.graphics.primitive.world.LineStrip method
get is a built-in method % matlab.graphics.primitive.world.PrimitiveBase method
get is a built-in method % matlab.graphics.primitive.world.Quadrilateral method
get is a built-in method % matlab.graphics.primitive.world.Text method
get is a built-in method % matlab.graphics.primitive.world.Group method
get is a built-in method % matlab.graphics.primitive.world.SceneNode method
get is a built-in method % matlab.graphics.primitive.canvas.CanvasFactory method
get is a built-in method % matlab.graphics.primitive.canvas.Canvas method
get is a built-in method % javahandle.com.mathworks.hg.peer.HG2FigurePeer method
get is a built-in method % javahandle.com.mathworks.hg.peer.ToolbarPeer method
get is a built-in method % javahandle.com.mathworks.hg.peer.ToolPushButtonPeer method
get is a built-in method % javahandle.com.mathworks.hg.peer.ToolToggleButtonPeer method
get is a built-in method % javahandle.com.mathworks.hg.peer.ToggleSplitButtonPeer method
get is a built-in method % javahandle.com.mathworks.hg.peer.MenuPeer method
get is a built-in method % schema.class method
get is a Java method % com.mathworks.product.util.ProductIdentifier method
get is a built-in method % schema.method method
/opt/MATLAB/R2018a/toolbox/matlab/randfun/@RandStream/get.m % RandStream method
/opt/MATLAB/R2018a/toolbox/matlab/winfun/@COM/get.m % COM method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@figobj/get.m % figobj method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@arrowline/get.m % arrowline method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@scribehgobj/get.m % scribehgobj method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@axischild/get.m % axischild method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@hgbin/get.m % hgbin method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@scribehandle/get.m % scribehandle method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@axisobj/get.m % axisobj method
/opt/MATLAB/R2018a/toolbox/matlab/graph2d/@axistext/get.m % axistext method
/opt/MATLAB/R2018a/toolbox/simulink/simulink/frameedit/@cellline/get.m % cellline method
/opt/MATLAB/R2018a/toolbox/simulink/simulink/frameedit/@celltext/get.m % celltext method
/opt/MATLAB/R2018a/toolbox/simulink/simulink/frameedit/@framerect/get.m % framerect method
/opt/MATLAB/R2018a/toolbox/instrument/instrument/@icgroup/get.m % icgroup method
/opt/MATLAB/R2018a/toolbox/instrument/instrument/@icdevice/get.m % icdevice method
/opt/MATLAB/R2018a/toolbox/instrument/instrument/@iviconfigurationstore/get.m % iviconfigurationstore method
/opt/MATLAB/R2018a/toolbox/shared/instrument/@instrument/get.m % instrument method
/opt/MATLAB/R2018a/toolbox/datafeed/datafeed/@fred/get.m % fred method
/opt/MATLAB/R2018a/toolbox/datafeed/datafeed/@reuters/get.m % reuters method
/opt/MATLAB/R2018a/toolbox/datafeed/datafeed/@rdth/get.m % rdth method
/opt/MATLAB/R2018a/toolbox/datafeed/datafeed/@datastream/get.m % datastream method
/opt/MATLAB/R2018a/toolbox/datafeed/datafeed/@factset/get.m % factset method
/opt/MATLAB/R2018a/toolbox/datafeed/datafeed/@kx/get.m % kx method
/opt/MATLAB/R2018a/toolbox/bioinfo/bioinfo/@phytree/get.m % phytree method
/opt/MATLAB/R2018a/toolbox/bioinfo/bioinfo/@BioMap/get.m % BioMap method
/opt/MATLAB/R2018a/toolbox/shared/controllib/engine/@InputOutputModel/get.m % InputOutputModel method
/opt/MATLAB/R2018a/toolbox/wavelet/wavelet/@laurpoly/get.m % laurpoly method
/opt/MATLAB/R2018a/toolbox/wavelet/wavelet/@wtbo/get.m % wtbo method
/opt/MATLAB/R2018a/toolbox/wavelet/wavelet/@wdectree/get.m % wdectree method
/opt/MATLAB/R2018a/toolbox/wavelet/wavelet/@wptree/get.m % wptree method
/opt/MATLAB/R2018a/toolbox/wavelet/wavelet/@ntree/get.m % ntree method
/opt/MATLAB/R2018a/toolbox/wavelet/wavelet/@dtree/get.m % dtree method
/opt/MATLAB/R2018a/toolbox/wavelet/wmultisig1d/@wpartobj/get.m % wpartobj method
/opt/MATLAB/R2018a/toolbox/matlab/serial/@serial/get.m % serial method
/opt/MATLAB/R2018a/toolbox/shared/statslib/@dataset/get.m % dataset method
/opt/MATLAB/R2018a/toolbox/signal/sptoolgui/@fdmeas/get.m % fdmeas method
/opt/MATLAB/R2018a/toolbox/signal/sptoolgui/@fdline/get.m % fdline method
/opt/MATLAB/R2018a/toolbox/signal/sptoolgui/@fdax/get.m % fdax method
/opt/MATLAB/R2018a/toolbox/signal/sptoolgui/@fdspec/get.m % fdspec method
/opt/MATLAB/R2018a/toolbox/matlab/timeseries/@timeseries/get.m % timeseries method
/opt/MATLAB/R2018a/toolbox/matlab/timeseries/@tscollection/get.m % tscollection method
/opt/MATLAB/R2018a/toolbox/mpc/mpc/@mpc/get.m % mpc method
/opt/MATLAB/R2018a/toolbox/mpc/mpc/@mpcmoveopt/get.m % mpcmoveopt method
/opt/MATLAB/R2018a/toolbox/mpc/mpc/@mpcstate/get.m % mpcstate method
/opt/MATLAB/R2018a/toolbox/mpc/mpc/@mpcsimopt/get.m % mpcsimopt method
/opt/MATLAB/R2018a/toolbox/shared/slcontrollib/@opcond/get.m % opcond method
/opt/MATLAB/R2018a/toolbox/wavelet/wavedemo/@wvtree/get.m % wvtree method
/opt/MATLAB/R2018a/toolbox/sl3d/sl3d/@vrfigure/get.m % vrfigure method
/opt/MATLAB/R2018a/toolbox/sl3d/sl3d/@vrworld/get.m % vrworld method
/opt/MATLAB/R2018a/toolbox/sl3d/sl3d/@vrnode/get.m % vrnode method
/opt/MATLAB/R2018a/toolbox/imaq/imaq/@imaqdevice/get.m % imaqdevice method
/opt/MATLAB/R2018a/toolbox/imaq/imaq/@imaqchild/get.m % imaqchild method
/opt/MATLAB/R2018a/toolbox/ident/ident/@iddata/get.m % iddata method
/opt/MATLAB/R2018a/toolbox/ident/nlident/@customreg/get.m % customreg method
/opt/MATLAB/R2018a/toolbox/ident/nlident/@idnlfun/get.m % idnlfun method
/opt/MATLAB/R2018a/toolbox/robust/rctobsolete/robust/@gsref/get.m % gsref method
>>
Alessandro Cuttin
on 9 Oct 2018
In response to @Jan
>> dbstop if warning
>> hold on
Warning: The Position specified is invalid
> In hold (line 37)
Warning from hold (line 37)
ax = gca;
K>>
Rafaelles
on 4 Jan 2019
Edited: Rafaelles
on 4 Jan 2019
I got the exactly same error and displayed messages as Alessandro today after installing Matlab r2018a in Fedora 29 os. Is there any solution or idea of what it might be happening?
EDIT: Actually it is a Virtual Machine, installing Matlab in Fedora has always several surprises, so I test in a VM before any change in my personal OS. I'm actually thinking about upgrading from Fedora 28 to 29, so I carried out this test and got the same issue as Alessadro. In my real machine with Fedora 28, Matlab works just fine.
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)