Grid colormap with colorized circles
Show older comments
In every node in the grid (9x8) I am rotating some workpiece by 30 degrees and calculating values for every rotation (Fig.1). Each rotation values are stored in sol_mat_MAN_all, and mean values of those 12 rotations are stored in mean_man_all. For every node (plot_points) I plot scatter3 diagram with mean values, so basically one colorized dot is based on mean value of all 12 rotations.
%% PLOT COLORMAP
load sol_mat_MAN_all.mat; % Load rotation values
load plot_points.mat; %Load plot points
mean_man_all=mean(sol_mat_MAN_all,2); % Mean rotation value for each grid point
% max_man_all=max(sol_mat_MAN_all,[],2); % Max rotation value for each grid point
%Plot
scatter3(plot_points(:,1),plot_points(:,2),plot_points(:,3),50, mean_man_all,'filled'); %Plot average mean value for every point
xlabel('X [m]'); ylabel('Y [m]'); zlabel('Z [m]');
colorbar; oldcmap = colormap('jet'); colormap(flipud(oldcmap)); hold on;

What I want to do now, is separate rotations and visualize them individually, like some kind of pie chart. Instead of having one colorized dot/circle I want to have this circle cut into 12 pieces where each piece will have its own color based on its rotation value. I have tried some bubble pie plot functions (https://www.mathworks.com/matlabcentral/fileexchange/98874-bubble-pie-chart?s_tid=blogs_rc_5) but I was unable to link values with colormap. Color wheels are also interested but it seems complicated to input my own colormap and plot the whole thing correctly in the grid.
Note that first value is zero rotation (0 degrees) and starts at the right side (Fig.1). My original scatter plot is in 3D where Z-axis is fixed, but here 2D plot is more appropriate. This or something similar should be the final plot, but with correct color for each rotation:

Accepted Answer
More Answers (0)
Categories
Find more on Orange in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!