Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pairplot yaxis diagonal

import numpy as np
import seaborn as sns
import pandas as pd

def my_hist(x, label, color):
    ax0 = plt.gca()
    ax = ax0.twinx()
    
    sns.despine(ax=ax, left=True, top=True, right=False)
    ax.yaxis.tick_right()
    ax.set_ylabel('Counts')
    
    ax.hist(x, label=label, color=color)

data = np.random.normal(0,2,[1000,3])
df = pd.DataFrame(data)

g = sns.PairGrid(df,corner=True)
g.map_diag(my_hist)
g.map_lower(sns.scatterplot)
Comment

PREVIOUS NEXT
Code Example
Python :: how delet an obj from memori in python 
Python :: separating numeric and categorical feature using loop 
Python :: load xgb 
Python :: Data type based on rows 
Python :: allowed_hosts error ecs django 
Python :: pyttsx3 interrupting an utterance 
Python :: Python getting content from xl range 
Python :: print same index and value on each iteration of the for loop in Python 
Python :: Examples pandas.read_hfd5() 
Python :: Flatten List in Python Using Shallow Flattening 
Python :: List Comprehension simple example 
Python :: how to create dict key with list default -2 
Python :: joining datasets by id python 
Python :: testing grepper python 
Python :: Python slides 
Python :: python multi dimensional dict 
Python :: transfer learning in python with custom dataset 
Python :: Javascript rendering problem in requests-html 
Python :: Python NumPy moveaxis function Example 02 
Python :: how to make dinamic table in jinja python 
Python :: Python NumPy ascontiguousarray Function Example Tuple to an array 
Python :: how to change text in heatmap matplotlib 
Python :: assignment 8.4 python data structures 
Python :: split() without argument 
Python :: get forex exchange rates in python 
Python :: python subprocess redirect a file 
Python :: enumerate and looping backward 
Python :: Remove Brackets from List Using the Translate method 
Python :: torch view vs unsqueeze 
Python :: django.db.utils.ProgrammingError: (1146 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =