How can I automatically create a Disk
with a certain number of segments that are differently colored automatically depending on some values I input? For example, I want a disk with seven segments of a certain size, e.g. the First segment is 40 % starting and ending at some specified angle, the second one is 40 % asf. So basically I just want to input my percentages and the colors and then the disc is created. This is similar to what PieChart
does, but I want to choose the position where a segment appears manually and it should be a graphics object.
I got as far as adjusting each of the segment in an awkwardly tedious way by manually finding the right values, but got stuck finding the right values automatically based on percentages.
innerDiskSize = 1
disk = {Orange, Disk[{0, 0}, innerDiskSize, {0.007, Pi/1.77}],
Magenta, Disk[{0, 0}, innerDiskSize, {Pi/1.77, 7.15 Pi/7}] , Red,
Disk[{0, 0}, innerDiskSize, {7.15 Pi/7, 9.38 Pi/7}], Blue,
Disk[{0, 0}, innerDiskSize, {9.38 Pi/7, 10.12 Pi/7}], Yellow,
Disk[{0, 0}, innerDiskSize, {10.12 Pi/7, 10.95 Pi/7}], Brown,
Disk[{0, 0}, innerDiskSize, {10.95 Pi/7, 11.85 Pi/7}] , Cyan,
Disk[{0, 0}, innerDiskSize, {11.85 Pi/7, 14.03 Pi/7}] }
Graphics[disk]
Any help appreciated!
PieChart
does $\endgroup$PieChart
has the optionSectorOrigin
$\endgroup$Head[PieChart[your input]]
returnGraphics
? $\endgroup$