Tags » MatPlotLib

[matplotlib] create figures on a remote server

On a remote server of mine I wanted to create some nice figures with matplotlib. It worked well on localhost but it failed on the server. 154 more words



matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and ipython shell (ala MATLAB®* or Mathematica®†), web application servers, and six graphical user interface toolkits. 88 more words


Stacking density plots in 3D in Matplotlib

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

X,Y = np.meshgrid(np.linspace(0,1,100),np.linspace(0,1,100))

A1 = np.sin(X)*np.sin(Y)
A2 = np.sin(X)*np.cos(Y)
A3 = np.sin(10*X)*np.cos(10*Y)

fig = plt.figure(figsize=plt.figaspect(2)*1)
ax = fig.add_subplot(111, projection='3d')
ax.contourf(X, Y, A1, 100, zdir='z', offset=0)
ax.contourf(X, Y, A2, 100, zdir='z', offset=0.5)
ax.contourf(X, Y, A3, 100, zdir='z', offset=1)



FITS (Part 4) : Histograms

In this part, we will learn how to get histogram of the FITS image :