te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>python-在windows系统中安装matplotlib
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python-在windows系统中安装matplotlib

运维笔记admin3浏览0评论

在windows系统中安装matplotlib

简介

Matplotlib 是一个 Python 的 2D绘图库,它以各种硬拷贝格式和跨平台的交互式环境生成出版质量级别的图形 。通过 Matplotlib,开发者可以仅需要几行代码,便可以生成绘图,直方图,功率谱,条形图,错误图,散点图等。

步骤

  1. 在windows系统中,首先需要安装Visual Studio。为此,请访问 https://dev.windows, 点击Downloads,再查找Visual Studio Community(一组免费的Windows开发工具)。请下载并运行该安装程序。

  2. 请访问 https://pypi.python/pypi/matplotlib/ ,查找与你使用的Python版本匹配的wheel文件并进行下载(我把该文件放置在D:\Python37\Scripts中)。例如,如果你使用的是64位的Python3.7,则需要下载matplotlib-3.0.2-cp37-cp37m-win_amd64.whl。

  3. 运行安装:打开cmd,切换到目录D:\Python37\Scripts,输入pip install matplotlib-3.0.2-cp37-cp37m-win_amd64.whl
    (matplotlib-3.0.2-cp37-cp37m-win_amd64.whl为上述下载的文件名)

测试matplotlib

1.测试matplotlib是否正式安装成功,首先使用Pythoy启动一个终端会话,再尝试导入matplotlib

2.如果没有报任何错误消息,就说明你的系统安装了matplotlib

发布评论

评论列表(0)

  1. 暂无评论