Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib pie chart order

colors = [ '#99f3bd', '#fbaccc','#a8df65', '#ff7b54']
fig, ax = plt.subplots(figsize=(5,15))
ax.set_title('Treatment Group', fontsize=25, fontname="Times New Roman Bold")
ax = df['q6_t'].value_counts(normalize=True).plot.pie(autopct='%1.0f%%', colors = colors)
ax.set_ylabel("")
plt.savefig('q6_t.png', bbox_inches = 'tight', transparent=True) 
Comment

PREVIOUS NEXT
Code Example
Python :: decision tree classifier python code for visualization 
Python :: calculate the shortest path of a graph in python 
Python :: how to get more than one longest string in a list python 
Python :: python IndexError: list assignment index out of range 
Python :: django sessions for beginners 
Python :: stacks in python 
Python :: tqdm 2 progress bars 
Python :: How to count the occurrence of certain item in an ndarray? 
Python :: python tableau 2d 
Python :: python glob subdirectories 
Python :: Python __mul__ 
Python :: is python a scripting language 
Python :: how to pop an exact number from a list in python 
Python :: spacy get number of tokens 
Python :: discord.py read custom status 
Python :: python dictionary key in range 
Python :: solve linear system python 
Python :: how to turn on debug mode in flask 
Python :: python decision tree classifier 
Python :: Python Tkinter Scale Widget 
Python :: upload_file boto3 headers 
Python :: python spread operator 
Python :: python import 
Python :: convert price to float pandas 
Python :: groupby fillna 
Python :: Django rest framework update or delete 
Python :: import permutations 
Python :: PHP echo multi lines Using Nowdoc variable 
Python :: python rock paper scissors game 
Python :: yahoo finance python documentation 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =