Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib facet scatter

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

#create a long df, with columns for name, total fruit, and rows for specific fruit counts
df_melt = pd.melt(df, id_vars=['Name', 'Fruits'], value_vars=['Apples','Bananas','Citrus'], var_name='Fruit_Type', value_name='Count')

g = sns.FacetGrid(df_melt, col="Name",  col_wrap = 2, hue = "Fruit_Type")
g = g.map(plt.scatter, "Count", "Fruits")
Comment

PREVIOUS NEXT
Code Example
Python :: if elif ladder in one line in python 
Python :: Create Tables From Migration 
Python :: how to create sets in python 
Python :: opening aws images with pillow 
Python :: Creating a Tuple with Mixed Datatypes. 
Python :: python os path join list 
Python :: Print 10 most important features ascending 
Python :: np.ptp 
Python :: cara ambil 2 kata menggunakan phyton 
Python :: move a file in python 
Python :: Convert PySpark RDD to DataFrame 
Python :: python datetime toordinal 
Python :: python Fibonacci series up to n 
Python :: logged_passengers 
Python :: updating lists 
Python :: comparison operators in python 
Python :: Find From Table Django 
Python :: pyqt5 running string and clock stackoverfloww 
Python :: os cd python 
Python :: python set xticks to int not float 
Python :: python pattern glob extension searching 
Python :: geodataframe and geoseries 
Python :: Django forms I cannot save picture file 
Python :: math plotlib 2 y axes 
Python :: setheading in python 
Python :: python import class as alias 
Python :: zoom in geopandas polot 
Python :: python Write code that asks users to enter the year they were born. Print out how many years old they will turn in 2019. 
Python :: MEDIANA EN PANDAS 
Python :: python type conversion 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =