Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
Circular can be plotted using Matlab's inbuilt rose function, but the resulting plots are not very pretty (and also overrepresent large values). Instead, this function plots data as circular dot plots.
Three functions are included: cdot_plot is the main function, which calculates the histogram and then calls cdot_hist to create the plot. The third function, cdot_label, can be used to add ticks and labels to the plot. Both cdot_plot and cdot_hist take a number of optional inputs to modify the appearance of the plot (see examples below or comments in the functions), and give the option to append dot plots to an existing graph. This latter option allows the user to plot two datasets into one graph with different dot colours.
Examples:
0) Create some random example data.
angles1 = randn(30, 1)*90+180;
angles2 = randn(30, 1)*90+180;
1) Plot data using defaults, and label it:
figure;
r = cdot_plot(angles1); % the output variable r defines the outer radius of the dotplot
cdot_label(0:30:330, r); % if r is not provided, the function will make a guess based on the largest rectangle object
2) Plot data with custom colours, and label with compass directions
figure;
r = cdot_plot(angles1, 5, 'k', 100, 7);
cdot_label(0:45:315, r, [], [], [], [], {'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'});
3) Plot both data sets in different colours, then label
cdot_plot(angles1, 5, 'b', 100, 7);
cdot_plot(angles2, 5, 'r', 100, 7, [], '-a');
cdot_label(0:90:270);
Cita come
Jochen Smolka (2026). CDOT - Creating circular dot plots (https://it.mathworks.com/matlabcentral/fileexchange/57827-cdot-creating-circular-dot-plots), MATLAB Central File Exchange. Recuperato .
Informazioni generali
- Versione 1.0.0.0 (3,4 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
| Versione | Pubblicato | Note della release | Action |
|---|---|---|---|
| 1.0.0.0 | Replaced example image |
