Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib log

plt.yscale('log')
Comment

matplotlib logarithmic scale

fig, axs = plt.subplots()
#on x asix
ax.set_xscale('log')
#on y asix
ax.set_yscale('log')
Comment

matplotlib matshow log scale

from pylab import figure, cm
from matplotlib.colors import LogNorm

# C = some matrix
f = figure(figsize=(6.2, 5.6))
ax = f.add_axes([0.17, 0.02, 0.72, 0.79])
axcolor = f.add_axes([0.90, 0.02, 0.03, 0.79])

im = ax.matshow(C, cmap=cm.gray_r, norm=LogNorm(vmin=0.01, vmax=1))

t = [0.01, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0]
f.colorbar(im, cax=axcolor, ticks=t, format="$%.2f$")

f.show()
Comment

PREVIOUS NEXT
Code Example
Python :: plotting two columns of a dataframe in python 
Python :: SciPy 1D Interpolation 
Python :: how to make minecraft using python 
Python :: how to reboot a python script 
Python :: how to slice even index value from a list in python using slice function 
Python :: create new env in anaconda 
Python :: How to Get the Difference Between Sets in Python 
Python :: python input function 
Python :: python refresh import 
Python :: threading python 
Python :: how to get current date and time in python 
Python :: transpose array python 
Python :: convert index of a pandas dataframe into a column 
Python :: how to change font in tkinter 
Python :: feature scaling in python 
Python :: python append a file and read 
Python :: select rows where column value is in list of values 
Python :: image rotate in python 
Python :: create and populate dictionary python 
Python :: How to do an infinte while in python 
Python :: how to create a tuple from csv python 
Python :: pandas name of day 
Python :: boxplot groupby pandas 
Python :: # convert dictionary into list of tuples 
Python :: pandas sort by columns 
Python :: ip condition in tpl 
Python :: pyspark show all values 
Python :: create a python3 virtual environment 
Python :: drop column pandas 
Python :: delete values with condition in numpy 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =