scatterhist problem 'color value must be a 3 element vector'
3 次查看(过去 30 天)
显示 更早的评论
When I try this: ( http://ch.mathworks.com/help/stats/generate-correlated-data-using-rank-correlation.html )
rng default % For reproducibility
p1 = pearsrnd(0,1,-1,4,1000,1);
p2 = pearsrnd(0,1,0.75,3,1000,1);
figure
scatterhist(p1,p2)
It gives me:
Error using matlab.graphics.chart.primitive.Histogram/set
While setting the 'FaceColor' property of Histogram:
Color value must be a 3 element vector
Error in internal.stats.plotGroupedHist (line 130)
set(hXLines(i),'FaceColor',clr(i,:));
Error in
scatterhist>@()internal.stats.plotGroupedHist(x,grp,'NBins',xbin,'Color',clr,'DisplayStyle',style,'Norm','pdf','AxisOn',false,'PlotGroup',plotGroup)
(line 299)
Xfunc = @()internal.stats.plotGroupedHist(x,grp,'NBins',xbin,...
Error in scatterhist (line 384)
Xfunc();
WHY? How can I solve?
9 个评论
Walter Roberson
2016-10-13
condor, you need to do one of the following:
- delete C:\Users\mauro\Desktop\MATLAB\MATLAB_Generale\PERIZIE\Anatocismo\OCR\lines.m -- which would probably interfere with using that software
- rename that file to something else -- which would probably interfere with using that software unless you edited all of the code in that package to use a different name
- use pathtool to move that OCR directory to below the Mathworks-supplied directories -- which would probably interfere with using that software
- use pathtool to remove the OCR directory for you MATLAB path -- this would require that you cd to that directory to run the software
- create a subdirectory named private in C:\Users\mauro\Desktop\MATLAB\MATLAB_Generale\PERIZIE\Anatocismo\OCR and move the lines.m file to that subdirectory. In theory that should allow that software to work without changing anything else
采纳的回答
Walter Roberson
2016-10-13
condor, you need to do one of the following:
- delete C:\Users\mauro\Desktop\MATLAB\MATLAB_Generale\PERIZIE\Anatocismo\OCR\lines.m -- which would probably interfere with using that software
- rename that file to something else -- which would probably interfere with using that software unless you edited all of the code in that package to use a different name
- use pathtool to move that OCR directory to below the Mathworks-supplied directories -- which would probably interfere with using that software
- use pathtool to remove the OCR directory for you MATLAB path -- this would require that you cd to that directory to run the software
- create a subdirectory named private in C:\Users\mauro\Desktop\MATLAB\MATLAB_Generale\PERIZIE\Anatocismo\OCR and move the lines.m file to that subdirectory. In theory that should allow that software to work without changing anything else
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!