Trouble converting table to scatterhistogram
显示 更早的评论
Hi I'm getting a weird error when converting a table into a scatterhistogram. I want the rr_la values to be on the same line on the y-axis in two separate parallel data sets for S10 and S12. The regions will just be color coded.
s = scatterhistogram(tablerr_la,'subjects','rr_la','GroupVariable','segments');
The "tablerr_la" in question looks like this:
tablerr_la =
32×3 table
subjects rr_la segments
________ __________ ________
'S10' -0.030551 'basal'
'S10' -0.040102 'basal'
'S10' 0.0016109 'basal'
'S10' -0.020057 'basal'
'S10' -0.033282 'basal'
'S10' -0.024207 'basal'
'S10' -0.050507 'mid'
'S10' -0.020694 'mid'
'S10' -0.020932 'mid'
'S10' -0.035626 'mid'
'S10' -0.081229 'mid'
'S10' -0.023346 'mid'
'S10' -0.026452 'apex'
'S10' -0.017935 'apex'
'S10' -0.037958 'apex'
'S10' -0.0082094 'apex'
'S12' -0.084489 'basal'
'S12' -0.013217 'basal'
'S12' -0.044645 'basal'
'S12' -0.033263 'basal'
'S12' -0.061952 'basal'
'S12' -0.10665 'basal'
'S12' -0.053985 'mid'
'S12' -0.017043 'mid'
'S12' -0.041353 'mid'
'S12' -0.043656 'mid'
'S12' -0.061401 'mid'
'S12' -0.033157 'mid'
'S12' 0.0051804 'apex'
'S12' -0.0054823 'apex'
'S12' -0.071557 'apex'
'S12' -0.043434 'apex'
The error I get when compiling is this:
>> StrainPlots
Error using scatterhistogram (line 82)
Expected XData to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64, categorical
Error in StrainPlots (line 60)
s = scatterhistogram(tablerr_la,'subjects','rr_la','GroupVariable','segments');
There is also no such line as line 82 but thats part of my issue.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Boundary Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!