草庐IT

matplotlib-basemap

全部标签

ruby - 在 ruby​​ 中使用 matplotlib.image 是否有等效项

一直在尝试在jupyternotebook中使用Ruby。使用Python我可以做到这一点importmatplotlib.imageasmpimg有谁知道Ruby的等价物,我没能在任何iRuby或sciruby文档中找到它?澄清一点,在我的gemfile中我有这个gem'iruby'gem'cztop'gem'matplotlib'但似乎无法访问我习惯在python中使用的matplotlib的image部分。我正试图找到在Python中我会这样写的Ruby版本#importingsomeusefulpackagesimportmatplotlib.pyplotaspltimport

Matplotlib.Colors.ListedColorMap在Python中

defplot_decision_regions(X,y,classifier,resolution=0.02):#setupmarkergeneratorandcolormapmarkers=('s','x','o','^','v')colors=('red','blue','lightgreen','gray','cyan')cmap=ListedColormap(colors[:len(np.unique(y))])#plotthedecisionsurfacex1_min,x1_max=X[:,0].min()-1,X[:,0].max()+1x2_min,x2_max=X[:,1].

python - pyinstaller有时找不到Matplotlib后端TkAgg

我正在使用pyinstaller为我们的PyQT工具打包一个Windows可执行文件。pyinstaller.exemain.py--pathpath_to_pyqt_libs--distpathoutputFolder--nametoolName5次中有4次,该工具找不到matplotlib后端TKagg:19537INFO:Matplotlibbackend"TkAgg":ignoredDLLloadfailed:Thespecifiedmodulecouldnotbefound.该过程仍然“成功”完成,但由于缺少库,我无法运行该工具。偶尔(约20%的时间)会找到(“添加”)库,并

适用于 Windows、matplotlib 和 opencv 的 Python

我已经尝试为Windows安装Python3.7。之后我尝试安装numpy等软件包,一切正常。但是,当我尝试安装matplotlib时,发现如下错误:*Thefollowingrequiredpackagescannotbebuilt:*freetype,png*Pleasecheckhttp://gnuwin32.sourceforge.net/packa*ges/freetype.htmforinstructionstoinstall*freetype*Pleasecheckhttp://gnuwin32.sourceforge.net/packa*ges/libpng.htmfo

python - matplotlib fatal error ft2

我在Windows7上安装了pythonxy,运行后出现错误frompylabimport*这似乎来自matplotlib,连接到ft2font模块。我试图通过从https://pypi.python.org/pypi/matplotlib/1.1.0下载它来重新安装matplotlib并运行pythonsetup.pyinstall安装中止并显示消息Infileincludedfromsrc/ft2font.cpp:3:0:src/ft2font.h:16:22:fatalerror:ft2build.h:Nosuchfileordirectory#include^compilati

python - conda 在 windows 64 上安装 matplotlib 的 natgrid python 工具包

尝试通过Anaconda在Windows64上安装natgridmatplotlib工具包(https://github.com/matplotlib/natgrid)。我只能找到一个Windows支持的软件包,就在这里https://anaconda.org/rios/natgrid当我运行condainstall-criosnatgrid=0.2它返回PackageNotFoundError:Packagenotfound:Condacouldnotfind'有人知道导致错误的原因吗,是否有其他包或解决方法可以让我在Windows上的Anacondapython发行版中使用natg

python - osx 上的 Tkinter/matplotlib 多个事件窗口

我有一个在我的windows机器上执行的脚本如下importmatplotlib.pyplotaspltimportnumpyasnpimporttkinterclassmain(tkinter.Frame):#mainwindowdef__init__(self,root):#initialisetkinter.Frame.__init__(self)self.root=roottkinter.Button(self,text='Newspots',command=self.newSpots).grid()defnewSpots(self):x=np.random.rand(10)y

【头歌】重生之我在py入门实训中(12):Matplotlib接口和常用图形

创作不易,参考之前,点个赞,收藏,关注一下不过分吧,家人们第1关:画图接口任务描述本关任务:掌握matplotlib的基本使用技巧,并能简单使用matplotlib进行可视化。-------------------------------------编程要求在右侧编辑器Begin-End补充代码,对传入的x,y两个数组做折线图,x对应x轴,y对应y轴。并保存到Task1/image1/T2.png,具体要求如下:折线图的figsize为(10,10);文件名为Task1/image1/T2.png。#**********Begin*********#fig=plt.figure(figsize

尝试绘制 : matplotlib. gif 时找不到 python matplotlib 错误

我在Win732位(Python版本为2.7.3)上使用PyDev和Eclipse。我还安装了Scipy和Matplotlib。现在,我要做的是将绘制的数据保存为pdf文件。这是一个代码示例,尽管它与我的问题无关:importscipyasspimportmatplotlib.pyplotaspltfromscipy.ioimportloadmatfname="calc.mat"data=loadmat(fname)train_acc,test_acc=data['train'],data['test']#plotresultsfig=plt.figure(1,figsize=(12,

python - windows下交互式matplotlib

当我在交互式pythonsession(通常是IPython)中时,执行以下命令:frommatplotlibimportpyplotaspltplt.plot([1,2,3,4])不会自动升起一个窗口,显示情节。我能让matplotlib真正提升窗口的唯一方法是使用show(),它还会捕获所有输入,直到我关闭窗口破坏绘图。现在我必须先给出我所有的绘图命令才能看到任何结果,这是一个主要的麻烦。在OSX上,我没有这个问题。我使用的后端是TkAgg。使用draw()和ion()调用无效。 最佳答案 如果你使用IPythonpylab模式