how to use gscatter plots
5 次查看(过去 30 天)
显示 更早的评论
I am wondering whether gscatter plots can be grouped with arrays containing two numbers:
I think I need to make structures from the data I am going to have in my datasets as datasets cant include arrays containing two og more numbers but structures can.
but my question is is this possible to write:
gscatter(temperature.zone_number, samlet_akt.zone_number, combination_salts_used, weight_percent_salts)
where the last two variables are my grouping variables and weightpercent is the grouping variable containing two numbers .
3 个评论
Walter Roberson
2021-12-22
The ways to call gscatter are
gscatter(x,y,g)
gscatter(x,y,g,clr,sym,siz)
gscatter(x,y,g,clr,sym,siz,doleg)
gscatter(x,y,g,clr,sym,siz,doleg,xnam,ynam)
You are passing in 4 parameters, so temperature.zone_number will be treated as x values, samlet_akt.zone_number will be treated as y values. Then the third parameter, combination_salts_used would be treated as a grouping number. The fourth parameter weightpercent would be treated as sym .
It sounds as if you want to pass in two different grouping parameters, as if there was a syntax like
gscatter(x, y, grouping1, grouping2)
but there is no syntax like that.
There is the syntax
gscatter(x, y, {grouping1, grouping2})
"in which case observations are in the same group if they have common values of all grouping variables"
Is that what you are looking for? If so
gscatter(temperature.zone_number, samlet_akt.zone_number, {combination_salts_used, weight_percent_salts})
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!