Skip to content

docs - maps have wrong default color pallete #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
danton267 opened this issue Oct 20, 2021 · 5 comments
Closed

docs - maps have wrong default color pallete #427

danton267 opened this issue Oct 20, 2021 · 5 comments

Comments

@danton267
Copy link
Member

gilbertogalvis pushed a commit that referenced this issue Oct 22, 2021
@gilbertogalvis
Copy link
Contributor

This issues was fixed by PR #434

Bellow share results for one example of each geo chart case

geoscatter function

Screen Shot 2021-10-22 at 5 32 53 PM

geoplot function

Screen Shot 2021-10-22 at 5 33 36 PM

geobubble function

Screen Shot 2021-10-22 at 5 34 00 PM

REMARK

It is important to note that for geo charts there is an optional parameter called 'geoRenderType'. This parameter can be set to 'geo' or 'mapbox'. Geo charts by default use 'geo'.

Below I share examples using 'mapbox'

geoscatter function

lon = (-170:10:170);
lat = 50 * cosd(3*lon);
A = 101 + 100*(sind(2*lon));
C = cosd(4*lon);
geoscatter(lat,lon,A,C,'^')

fig2plotly(gcf, 'geoRenderType', 'mapbox');

Screen Shot 2021-10-22 at 4 35 22 PM

geoplot function

latSeattle = 47.62;
lonSeattle = -122.33;
latAnchorage = 61.20;
lonAnchorage = -149.9;

geoplot([latSeattle latAnchorage],[lonSeattle lonAnchorage],'g-*')
geolimits([45 62],[-149 -123])

fig2plotly(gcf, 'geoRenderType', 'mapbox');

Screen Shot 2021-10-22 at 5 03 05 PM

geobubble function

tsunamis = readtable('tsunamis.xlsx');

tsunamis.Cause = categorical(tsunamis.Cause);

geobubble(tsunamis,'Latitude','Longitude', ...
    'SizeVariable','MaxHeight','ColorVariable','Cause');

fig2plotly(gcf, 'geoRenderType', 'mapbox');

Screen Shot 2021-10-22 at 5 07 44 PM

NOTE:

The mapbox option makes geo charts more elegant, but has limitations regarding markers (they can only be circles)

gilbertogalvis added a commit that referenced this issue Oct 22, 2021
@danton267
Copy link
Member Author

Noting down here that none of the axes are captured with fig2plotly().

@danton267
Copy link
Member Author

tsunamis = readtable('tsunamis.xlsx');

colordata = categorical(tsunamis.Cause);

gb = geobubble(tsunamis.Latitude,tsunamis.Longitude,tsunamis.MaxHeight,colordata,'Title','Tsunamis');

gb.SizeLegendTitle = 'Max Height';
gb.ColorLegendTitle = 'Cause';

fig2plotly(gcf);

not captured properly

@gilbertogalvis
Copy link
Contributor

Noting down here that none of the axes are captured with fig2plotly().

Yes. When I updated this functionality I wrote it down as an observation. The plotly functionalities used to create the geo charts do not allow to configure the tick labels and some other axes features

gilbertogalvis pushed a commit that referenced this issue Oct 26, 2021
gilbertogalvis added a commit that referenced this issue Oct 26, 2021
@gilbertogalvis
Copy link
Contributor

tsunamis = readtable('tsunamis.xlsx');

colordata = categorical(tsunamis.Cause);

gb = geobubble(tsunamis.Latitude,tsunamis.Longitude,tsunamis.MaxHeight,colordata,'Title','Tsunamis');

gb.SizeLegendTitle = 'Max Height';
gb.ColorLegendTitle = 'Cause';

fig2plotly(gcf);

not captured properly

This issue was fixed by PR #462

Result using 'geo' as 'geoRenderType'

Screen Shot 2021-10-26 at 9 13 37 AM

Result using 'mapbox' as 'geoRenderType'

Screen Shot 2021-10-26 at 9 14 06 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants