Hello! I want to ask how to draw some pie charts in a map by using the m_map package? And move the pie charts to the corresponding latitude and longitude position? Thanks!
I downloaded the package and then modified the m_ellipse.m program in that package to create a new m_piechart.m that produces this map. The .m files are attached.
When I run the command [h] = m_piechart (X, XColor, long, lat ....) I get this message "Error Using m_piechart (Line 87) Input X must sum To 100 or 1 how to solve this problem?
I don't remember, it's been a year... but I think the X vector is the percentage for each slice of the pie, so it needs to be 100% in total. You could modify the program to renormalize the X vector to 100 or if the sum is less than 100 then have it have an empty slice. I think I made it so you could normalize to 1 or 100%. WIth a sum(X) = 1 then each fractional value is the angular extent of the pie.
Thank you Meg Noah for this answer I was able to place a pie chart on the map but it's so big that it covers the whole map my concern is a bit complex since I want to materialize the pie chart in a smaller space (on the coast from kribi in Cameroon) how then to reduce the radius / circumference of the circle so that the map can appear with the circle above?
Thank you Meg Noah for this answer I was able to place a pie chart on the map but it's so big that it covers the whole map my concern is a bit complex since I want to materialize the pie chart in a smaller space (on the coast from kribi in Cameroon) how then to reduce the radius / circumference of the circle so that the map can appear with the circle above?
change the penultimate value of [] (default scale value is 1) to a value less than 1. Make it 1/2 or 1/10. Then if that works to reduce the size, take a guess-check-and-revise strategy to visually find the appealing size of the pie.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.