Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

colorbar over two axes

import numpy as np
import matplotlib.pyplot as plt

fig, axes = plt.subplots(nrows=2, ncols=2)
for ax in axes.flat:
    im = ax.imshow(np.random.random((10,10)), vmin=0, vmax=1)

fig.subplots_adjust(right=0.8)
cbar_ax = fig.add_axes([0.85, 0.15, 0.05, 0.7])
fig.colorbar(im, cax=cbar_ax)

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: NumPy bitwise_or Syntax 
Python :: NumPy bitwise_xor Code When inputs are arrays 
Python :: NumPy left_shift Code When inputs and bit shift are numbers 
Python :: NumPy unpackbits Code Unpacked array along axis 1 
Python :: python subprocess redirect a file 
Python :: make a dict from td scrape 
Python :: Termfastapi get ip 
Python :: flatten a list using numpy and itertools 
Python :: fibo_itrativ 
Python :: lpython list unino 
Python :: how to initialize a token spacy python 
Python :: create loop python 
Python :: Visual Studio Code pylint: Error when all is ok 
Python :: pygame borders on window 
Python :: print(i) 
Python :: how to Capture only the ICMP packet. using bpf 
Python :: block-all-mixed-content csp bypass python 
Python :: how to add start menu in python 
Python :: Deploying matlab app on the web using python 
Python :: python QFileDialog select files 
Python :: connect labjack to python 
Python :: ring Insert Items in list 
Python :: ring get a list of functions names written in the Ring language 
Python :: open urls using python grepper 
Python :: cannot set `other` if drop=True 
Python :: raise keyerror(key) from none os.environ 
Python :: websocket communitation to another pc python 
Python :: modwt python github code 
Python :: rolingmean python 
Python :: python colorama 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =