Hi Folks-

I'm working on a plot using an Aitoff projection, and I've noticed a couple
of problems:

1. There seems a problem with the positioning of contour labels in some of
the projections. In the Aitoff, Lambert, and Mollweide projections, the
some of the contour labels appear to be shifted. In the Hammer projection
of my example one of them (0.524) looks to be slightly off, but it's close
enough. The polar projection is fine.

2. When saving the output in eps format, the Aitoff, Hammer, and Lambert
projections are producing postscript that cannot be interpreted by
ghostview.

I've copied a minimal script to demonstrate the problem at the end of this
email.

Any ideas?
Thanks in advance!
--Chad


import numpy as np
from numpy import arccos, sin, cos, pi
import matplotlib.pyplot as plt

# setup the contour grid
X = np.arange(-180.0,180.0, 1) * pi/180
Y = np.arange(-90.0,90.0, 1) * pi/180
Z = np.zeros([len(Y), len(X)])

# compute the contour field
for x in range(0,360,1):
    for y in range(0,180,1):
        Z[y,x] = arccos(sin(pi/4)*sin(Y[y]) +
                cos(pi/4)*cos(Y[y])*cos(-90*pi/180 - X[x]))

f=[];
ax=[];
for projection in ["hammer", "aitoff", "lambert", "mollweide", "polar"]:
    f.append(plt.figure())
    ax.append(plt.subplot(111, projection=projection))
    plt.grid("on")

    Cplot = plt.contour(X,Y,Z, np.array([30.0, 60, 90, 120, 150])*pi/180)
    plt.clabel(Cplot, inline=1)

    plt.savefig("contourLabels{}.png".format(projection))
    plt.savefig("contourLabels{}.eps".format(projection))
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to