Color Variable not working in GeoBubble

2 visualizaciones (últimos 30 días)
Harold Canchari Daga
Harold Canchari Daga el 1 de Mzo. de 2021
Comentada: Harold Canchari Daga el 1 de Mzo. de 2021
Hi,
I'm a beginner at Matlab and I have one simple issue about "Color Variable" used in geobubble.
I ran the code but i get an error message
geobubble(EventTypes.Begin_Lat,EventTypes.Begin_Lon,'ColorVariable','State')
Do you an idea of what can be the problem?
Thank in advance for your help,
Harold

Respuestas (1)

Cris LaPierre
Cris LaPierre el 1 de Mzo. de 2021
Try the following syntax
For your data, that means the following.
geobubble(EventTypes.Begin_Lat,EventTypes.Begin_Lon,[],State)
Don't put your variable name in quotes, as that passes in a character array of letters instead of a variable of values.
  2 comentarios
Cris LaPierre
Cris LaPierre el 1 de Mzo. de 2021
If instead you are using a table, then follow this example. For what you've shown, that means your table name first, then the table variables that correspond to each input. In this syntax, you do pass in the inputs as character arrays because you are telling MATLAB the variable names to use in the table.
geobubble(EventTypes,'Begin_Lat','Begin_Lon','ColorVariable','State')
Harold Canchari Daga
Harold Canchari Daga el 1 de Mzo. de 2021
Thanks @Cris LaPierre ! The problem was the quotes, now it is working correctly. Thank you very much again.
Have a great day

Iniciar sesión para comentar.

Categorías

Más información sobre Geographic Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by