Create a sunflower plot

조회 수: 3 (최근 30일)
Hari
Hari 2015년 5월 6일
답변: Star Strider 2015년 5월 6일
Hi,
Is there a way to create sunflowerplot in Matlab. I have high density bivariate data and would like to represent in a suitable scatter plot.
In R I could use a function of the same name . Please let know
PS: Cursory google search for sunflowerplot in matlab yielded plotting of sunflower itself, golden ratio etc
Thanks Hari

답변 (1개)

Star Strider
Star Strider 2015년 5월 6일
The closest MATLAB could come to it is probably the hist3 bivariate histogram function, particularly Histogram Bars Colored According to Height. To get the ‘sunflower plot’ effect, you would add ‘view([0 90])’ to the code in the documentation:
load carbig
X = [MPG,Weight];
hist3(X,[7 7]);
xlabel('MPG'); ylabel('Weight');
set(gcf,'renderer','opengl');
set(get(gca,'child'),'FaceColor','interp','CDataMode','auto');
view([0 90])
You could experiment with the colormap to get the effect you want. (This example uses the default colormap.)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by