radar_chart
This function creates a radar chart.
radar_chart(**kwargs)
Input variables
Name | Description | Type |
---|---|---|
plot_setup | Setup chart dictionary with the following keys:
| dictionary |
dataset | Dataset to plot | List or array |
Output variables
Name | Description | Type |
---|---|---|
None | The function displays the plot on the screen and saves it to the local folder of the .ipynb or .py | None |
Example 1
Use the radar_chart
function to perform a task.
# Data
df = pd.DataFrame({'group': ['SVM', 'ANN', 'FA', 'GA'],
'score1': [38, 1.5, 30, 4],
'score2': [29, 10, 9, 34],
'score3': [8, 39, 23, 24],
'score4': [17, 18, 45, 54]
})
# Chart setup
chart_config = {
'name': 'Figure1-6-1',
'width': 15,
'height': 15,
'text size': 15,
'div color': "blue",
'radar color': ['#FF0000', 'magenta', 'black', 'blue'],
'opacity': 0.05,
'background': '#9FE2BF',
'legend size': 12,
'dots per inch': 600,
'extension': 'svg',
}
# Data statement
data = {'dataset': df}
# Call function
radar_chart(dataset=data, plot_setup=chart_config)
Figure 1. Machine learning scores.