Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Customizing plot with axes object

# Set figure size (width, height) in inches
fig, ax = plt.subplots(figsize = ( 5 , 3 ))
  
# Plot the scatterplot
sns.scatterplot( ax = ax , x = "total_bill" , y = "tip" , data = tips )
  
# Set label for x-axis
ax.set_xlabel( "Total Bill (USD)" , size = 12 )
  
# Set label for y-axis
ax.set_ylabel( "Tips (USD)" , size = 12 )
  
# Set title for plot
ax.set_title( "Bill vs Tips" , size = 24 )
  
# Display figure
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: find difference between two triangular numbers python 
Python :: How to use a function output as an input of another function in Python 
Python :: docker python no module named 
Python :: pandas to_csv overwrite check 
Python :: Understand the most appropriate graph to use for your dataset 
Python :: barplot hatch 
Python :: add all columns in django 
Python :: How to convert Gender to numeric variable 
Python :: change label in dataframe per condition 
Python :: groupby and assign number to each group pandas 
Python :: Create multiple lists with defined shape filled with 0 
Python :: 1046 - Game Time 
Python :: python google translator 
Python :: pandas python multiindex 
Python :: import mongodatetime flask 
Python :: poisson disc python 
Python :: create canvas for signature flutter 
Python :: infinty in python 
Python :: moving element to the start ofa list python 
Python :: how to create datetime from negative epoch in python 
Python :: cumulative chart python plotly 
Python :: 12000000/12 
Python :: pyqt5 update display 
Python :: tuto date and time python 
Python :: ciclo while python 
Python :: cdf empírica python 
Python :: devu and friendship testing codechef solution 
Python :: for loop does not work with open 
Python :: dont squeeze plot when creating colorbar matplotlib 
Python :: how to make a number guessing game in python 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =