Note that there are some explanatory texts on larger screens.

plurals
  1. POMatplotlib basemaps draws two parallels on stereographic projection
    primarykey
    data
    text
    <p>This is my first question on Stack Overflow, so my apologies if I've overlooked anything. I'm making a plot of cruise positions, and I am getting a double-parallel happening at 60 degrees North, with one being a straight line (on a stereographic projection).</p> <p>Does anybody know what I'm doing to cause this?</p> <p>My plotting script (referencing external data):</p> <pre><code>from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt import sys import csv dataFile = sys.argv[1] dataStream = open(dataFile, 'rb') dataReader = csv.reader(dataStream, delimiter=',') numRows = sys.argv[2] dataLat = [] dataLon = [] dataReader.next() for row in dataReader: dataLon.append(float(row[5])) dataLat.append(float(row[6])) m = Basemap(width=450000,height=150000, resolution='f',projection='stere',\ lat_ts=65.4,lat_0=60.4,lon_0=1.91) m.drawcoastlines(linewidth=0.2) m.fillcontinents(color='white', lake_color='aqua') x, y = m(dataLat,dataLon) m.scatter(x,y,.5,marker='.',color='k') m.drawparallels(np.arange(0.,81,1.), labels=[1,0,0,0], fontsize=10) m.drawmeridians(np.arange(-180.,181.,5.), labels=[0,0,0,1], fontsize=10) m.drawmapboundary(fill_color='aqua') plt.title("Cruise Track") plt.show() </code></pre> <p><strong>Example:</strong> <img src="https://i.stack.imgur.com/hAmWV.png" alt="Example plot"></p> <p>One other small question: what are the units of the width / height of the plot? It does not appear to be in the documentation, and I can't find it mentioned on any tutorials, etc.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload