Showing posts with label Log. Show all posts
Showing posts with label Log. Show all posts
Plot 12-bit tiff image with log scale colorbar using python & matplotlib.pyplot
The result is:
Some of the output data from measuring equipment have 12-bit unsigned int data. In some case, tiff format is used to ensure the convenience of the users. Reading the 12-bit tiff file and plotting the 12-bit tiff file is very easy. In addition, you can increase the visibility of the output figure by using log scale colormap when you plotting the tiff file. This page shows how to plot 12-bit tiff file in log scale using python and matplotlib.pyplot. 2D gaussian distribution is used as an example data.
Convert x value to symlog scale with zero shift using Python and matplotlib.pyplot
The result is:
This code shows how to convert x value to symlog scale with zero shift using Python and matplotlib.pyplot
Plot contour figure from data which has large scale and plus-minus difference with minimum limit using Python and matplotlib.pyplot
The result is:
This page shows my suggestion to generate contour figure from data which has large scale and plus-minus difference using python and matplotlib.pyplot. The minimum value and maximum value can be specified in this code.
Labels:
Color,
Contour,
Label,
Log,
Matplotlib,
Python,
Simulation,
Symlog
Plot contour figure from data which has large scale and plus-minus difference using Python and matplotlib.pyplot
The result is:
This page shows my suggestion to generate contour figure from data which has large scale and plus-minus difference using python and matplotlib.pyplot.
Labels:
Color,
Contour,
Label,
Log,
Matplotlib,
Python,
Simulation,
Symlog
Plot 1D data which has large scale and plus-minus difference using Python and matplotlib.pyplot
The result is:
This page shows my suggestion to generate 1D line figure from data which has large scale and plus-minus difference using python and matplotlib.pyplot.
Draw minor ticks at arbitrary place using Python Matplotlib.pyplot
In [1]:
import matplotlib.pyplot as plt
import numpy as np
from itertools import product
from matplotlib import ticker
%matplotlib inline
In [2]:
plt.figure(figsize=(4,3),facecolor="w")
plt.plot([0,1],[0,1])
minors = [0.1,0.12,0.125,0.15,0.16,0.17,0.18,0.19]
plt.axes().xaxis.set_minor_locator(ticker.FixedLocator(minors))
plt.tick_params(which='minor', length=3, color='r')
In [3]:
plt.figure(figsize=(4,3),facecolor="w")
plt.plot(np.log10([1,100]),np.log10([1,100]))
xtks = np.array([1,10,100])
xtkp = np.log10(xtks)
plt.axes().set_xticks(xtkp)
plt.axes().set_xticklabels(xtks)
ytks = np.array([1,10,100])
ytkp = np.log10(ytks)
plt.axes().set_yticks(ytkp)
plt.axes().set_yticklabels(ytks)
xminors = np.log10([2,3,5,20,30,40,50,60,70,80,90])
yminors = np.log10(([k*m for k,m in product([2,3,4,5,6,7,8,9],[1,10])]))
plt.axes().xaxis.set_minor_locator(ticker.FixedLocator(xminors))
plt.axes().yaxis.set_minor_locator(ticker.FixedLocator(yminors))
plt.tick_params(which='minor', length=3, color='k')
Subscribe to:
Comments (Atom)





