由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
_Python版 - error draw map from shape file Python 3.2 basemap (转载)
相关主题
google app engine 里 加载 numpy查看numpy使用的数学库的信息
ploting 3D surface in python (转载)例子:把数据存入HDF5文件后用Matlab读取
solve integral eq. embeeded with another integral eq. (转载)Re: python .pyw问题请教
An easter egg in Python :)python程序运行速度的问题 (转载)
One question about import exe result to python script└ Re: python程序运行速度的问题
如何用 Python 修改 mp3 文件的音乐标题Is it possible to use c++ objects from python code?
请问如何import一个python文件└ Re: Is it possible to use c++ objects from python code?
有matplotlib或numpy/scipy的同学帮我试试├ Re: Is it possible to use c++ objects from python code?
相关话题的讨论汇总
话题: basemap话题: import话题: labels话题: python话题: meridians
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 Programming 讨论区 】
发信人: light009 (light009), 信区: Programming
标 题: error draw map from shape file Python 3.2 basemap
发信站: BBS 未名空间站 (Sat Feb 14 13:51:37 2015, 美东)
I am working on drawing map from shape file in Python 3.2 basemap.
But, the longitude values at the bottom axis are only shown partially. Also,
all latitude values are missing.
Here is my python code.
import shapefile as sf
import sys
import numpy as np
import matplotlib.pylab as plt
from mpl_toolkits.basemap import Basemap
map = Basemap(projection='stere', lon_0=-106.4, lat_0= 31.9, lat_ts = 31.9
,
llcrnrlat=31.7, urcrnrlat= 31.85,
llcrnrlon=-106.5 , urcrnrlon= -106.1,
rsphere=6371200., resolution='l', area_thresh=1000)
plt.figure(num=None, figsize=(10, 8), dpi=80, facecolor='w', edgecolor='k')
parallels = np.arange(31.7, 31.85, 0.25)
map.drawparallels(parallels, labels=[0, 0, 0, 1] , fontsize=10, labelstyle='
+/-', dashes=[2, 2])
meridians = np.arange (-106.5, -106.1, 0.25)
map.drawmeridians(meridians, labels=[0, 0, 0, 1], fontsize=10, labelstyle='+
/-' , dashes=[2, 2])
No matter how I changed the labels, the latitude/longitude legend values are
still missing.
l******9
发帖数: 579
2
【 以下文字转载自 Programming 讨论区 】
发信人: light009 (light009), 信区: Programming
标 题: error draw map from shape file Python 3.2 basemap
发信站: BBS 未名空间站 (Sat Feb 14 13:51:37 2015, 美东)
I am working on drawing map from shape file in Python 3.2 basemap.
But, the longitude values at the bottom axis are only shown partially. Also,
all latitude values are missing.
Here is my python code.
import shapefile as sf
import sys
import numpy as np
import matplotlib.pylab as plt
from mpl_toolkits.basemap import Basemap
map = Basemap(projection='stere', lon_0=-106.4, lat_0= 31.9, lat_ts = 31.9
,
llcrnrlat=31.7, urcrnrlat= 31.85,
llcrnrlon=-106.5 , urcrnrlon= -106.1,
rsphere=6371200., resolution='l', area_thresh=1000)
plt.figure(num=None, figsize=(10, 8), dpi=80, facecolor='w', edgecolor='k')
parallels = np.arange(31.7, 31.85, 0.25)
map.drawparallels(parallels, labels=[0, 0, 0, 1] , fontsize=10, labelstyle='
+/-', dashes=[2, 2])
meridians = np.arange (-106.5, -106.1, 0.25)
map.drawmeridians(meridians, labels=[0, 0, 0, 1], fontsize=10, labelstyle='+
/-' , dashes=[2, 2])
No matter how I changed the labels, the latitude/longitude legend values are
still missing.
1 (共1页)
相关主题
├ Re: Is it possible to use c++ objects from python code?One question about import exe result to python script
└ Re: Re: Is it possible to use c++ objects from python co如何用 Python 修改 mp3 文件的音乐标题
Question about this python error.请问如何import一个python文件
damn! just found some more "secrets" INSIDE "this"有matplotlib或numpy/scipy的同学帮我试试
google app engine 里 加载 numpy查看numpy使用的数学库的信息
ploting 3D surface in python (转载)例子:把数据存入HDF5文件后用Matlab读取
solve integral eq. embeeded with another integral eq. (转载)Re: python .pyw问题请教
An easter egg in Python :)python程序运行速度的问题 (转载)
相关话题的讨论汇总
话题: basemap话题: import话题: labels话题: python话题: meridians