scatterhist X & Y length error
1 view (last 30 days)
Show older comments
Hi Guys!
I've been using a GUIDE GUI to display data on a set of axes. The user has the option to use a bar graph, scatter plot, or scatterhist. The problem shows up with the scatterhist function. The code I'm using is as follows:
scatterhist(handles.PDBPlot,DataXPlot2,DataYPlot2);
Which generates the following error:
Error using scatterhist (line 120)
X and Y must be numeric vectors with the same length.
I've check it, and DataXPlot2 and DataYPlot2 are the same length, and when I bring those arrays into the Workspace, the scatterhist command works fine, so something about my handles.PDBPlot (tag of my axes) is tripping it up. I'm a little stuck on this one, and some help from you guys would be really great!
Thanks,
Dan
0 Comments
Answers (1)
Star Strider
on 14 Oct 2014
I don’t know what you’re doing here with the first argument:
scatterhist(handles.PDBPlot,DataXPlot2,DataYPlot2);
2 Comments
Star Strider
on 14 Oct 2014
The scatter function offers that option in its allowed input arguments, but scatterhist does not, at least that I can determine.
See Also
Categories
Find more on Migrate GUIDE Apps 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!