两个画图工具助力论文绘图

2023-05-16

欢迎关注笔者的微信公众号


如果使用matplotlib绘制论文图片时需要做非常多的设置,字体,大小,间距,多子图配置等,而这些操作可以封装好从而简化用户工作量。Proplot对matplotlib进行了封装和美化,用户可以使用与matplotlib相似的操作就画出更精美的图片。SciencePlots是matplotlib的样式库,内置了很多样式供用户选择,用它画出的图片可以满足出版的要求。

Proplot

要使用proplot绘图,必须先调用 figure 或 subplots 。这些是根据同名的 pyplot 命令建模的。跟matplotlib.pyplot 一样,subplots 一次创建一个图形和一个子图网格,而 figure 创建一个空图形,之后可以用子图填充。下面显示了一个只有一个子图的最小示例。

安装

pip install proplot
conda install -c conda-forge proplot
# Simple subplot grid
import numpy as np
import proplot as pplt
import warnings
warnings.filterwarnings('ignore')
state = np.random.RandomState(51423)
data = 2 * (state.rand(100, 5) - 0.5).cumsum(axis=0)
fig = pplt.figure()
ax = fig.subplot(121)
ax.plot(data, lw=2)
ax = fig.subplot(122)
fig.format(
    suptitle='Simple subplot grid', title='Title',
    xlabel='x axis', ylabel='y axis'
)
# fig.save('~/example1.png')  # save the figure
# fig.savefig('~/example1.png')  # alternative
png
# Complex grid
import numpy as np
import proplot as pplt
state = np.random.RandomState(51423)
data = 2 * (state.rand(100, 5) - 0.5).cumsum(axis=0)
array = [  # the "picture" (0 == nothing, 1 == subplot A, 2 == subplot B, etc.)
    [1, 1, 2, 2],
    [0, 3, 3, 0],
]
fig = pplt.figure(refwidth=1.8)
axs = fig.subplots(array)
axs.format(
    abc=True, abcloc='ul', suptitle='Complex subplot grid',
    xlabel='xlabel', ylabel='ylabel'
)
axs[2].plot(data, lw=2)
# fig.save('~/example2.png')  # save the figure
# fig.savefig('~/example2.png')  # alternative
# Really complex grid
import numpy as np
import proplot as pplt
state = np.random.RandomState(51423)
data = 2 * (state.rand(100, 5) - 0.5).cumsum(axis=0)
array = [  # the "picture" (1 == subplot A, 2 == subplot B, etc.)
    [1, 1, 2],
    [1, 1, 6],
    [3, 4, 4],
    [3, 5, 5],
]
fig, axs = pplt.subplots(array, figwidth=5, span=False)
axs.format(
    suptitle='Really complex subplot grid',
    xlabel='xlabel', ylabel='ylabel', abc=True
)
axs[0].plot(data, lw=2)
# fig.save('~/example3.png')  # save the figure
# fig.savefig('~/example3.png')  # alternative
# Using a GridSpec
import numpy as np
import proplot as pplt
state = np.random.RandomState(51423)
data = 2 * (state.rand(100, 5) - 0.5).cumsum(axis=0)
gs = pplt.GridSpec(nrows=2, ncols=2, pad=1)
fig = pplt.figure(span=False, refwidth=2)
ax = fig.subplot(gs[:, 0])
ax.plot(data, lw=2)
ax = fig.subplot(gs[0, 1])
ax = fig.subplot(gs[1, 1])
fig.format(
    suptitle='Subplot grid with a GridSpec',
    xlabel='xlabel', ylabel='ylabel', abc=True
)
# fig.save('~/example4.png')  # save the figure
# fig.savefig('~/example4.png')  # alternative


import proplot as pplt
import numpy as np
state = np.random.RandomState(51423)

# Selected subplots in a simple grid
fig, axs = pplt.subplots(ncols=4, nrows=4, refwidth=1.2, span=True)
axs.format(xlabel='xlabel', ylabel='ylabel', suptitle='Simple SubplotGrid')
axs.format(grid=False, xlim=(0, 50), ylim=(-4, 4))
axs[:, 0].format(facecolor='blush', edgecolor='gray7', linewidth=1)  # eauivalent
axs[:, 0].format(fc='blush', ec='gray7', lw=1)
axs[0, :].format(fc='sky blue', ec='gray7', lw=1)
axs[0].format(ec='black', fc='gray5', lw=1.4)
axs[1:, 1:].format(fc='gray1')
for ax in axs[1:, 1:]:
    ax.plot((state.rand(50, 5) - 0.5).cumsum(axis=0), cycle='Grays', lw=2)

# Selected subplots in a complex grid
fig = pplt.figure(refwidth=1, refnum=5, span=False)
axs = fig.subplots([[1, 1, 2], [3, 4, 2], [3, 4, 5]], hratios=[2.2, 1, 1])
axs.format(xlabel='xlabel', ylabel='ylabel', suptitle='Complex SubplotGrid')
axs[0].format(ec='black', fc='gray1', lw=1.4)
axs[1, 1:].format(fc='blush')
axs[1, :1].format(fc='sky blue')
axs[-1, -1].format(fc='gray4', grid=False)
axs[0].plot((state.rand(50, 10) - 0.5).cumsum(axis=0), cycle='Grays_r', lw=2)
import proplot as pplt
import numpy as np

# Sample data
N = 20
state = np.random.RandomState(51423)
data = N + (state.rand(N, N) - 0.55).cumsum(axis=0).cumsum(axis=1)

# Example plots
cycle = pplt.Cycle('greys', left=0.2, N=5)
fig, axs = pplt.subplots(ncols=2, nrows=2, figwidth=5, share=False)
axs[0].plot(data[:, :5], linewidth=2, linestyle='--', cycle=cycle)
axs[1].scatter(data[:, :5], marker='x', cycle=cycle)
axs[2].pcolormesh(data, cmap='greys')
m = axs[3].contourf(data, cmap='greys')
axs.format(
    abc='a.', titleloc='l', title='Title',
    xlabel='xlabel', ylabel='ylabel', suptitle='Quick plotting demo'
)
fig.colorbar(m, loc='b', label='label')
import proplot as pplt
import numpy as np
fig, axs = pplt.subplots(ncols=2, nrows=2, refwidth=2, share=False)
state = np.random.RandomState(51423)
N = 60
x = np.linspace(1, 10, N)
y = (state.rand(N, 5) - 0.5).cumsum(axis=0)
axs[0].plot(x, y, linewidth=1.5)
axs.format(
    suptitle='Format command demo',
    abc='A.', abcloc='ul',
    title='Main', ltitle='Left', rtitle='Right',  # different titles
    ultitle='Title 1', urtitle='Title 2', lltitle='Title 3', lrtitle='Title 4',
    toplabels=('Column 1', 'Column 2'),
    leftlabels=('Row 1', 'Row 2'),
    xlabel='xaxis', ylabel='yaxis',
    xscale='log',
    xlim=(1, 10), xticks=1,
    ylim=(-3, 3), yticks=pplt.arange(-3, 3),
    yticklabels=('a', 'bb', 'c', 'dd', 'e', 'ff', 'g'),
    ytickloc='both', yticklabelloc='both',
    xtickdir='inout', xtickminor=False, ygridminor=True,
)


import proplot as pplt
import numpy as np

# Update global settings in several different ways
pplt.rc.metacolor = 'gray6'
pplt.rc.update({'fontname': 'Source Sans Pro', 'fontsize': 11})
pplt.rc['figure.facecolor'] = 'gray3'
pplt.rc.axesfacecolor = 'gray4'
# pplt.rc.save()  # save the current settings to ~/.proplotrc

# Apply settings to figure with context()
with pplt.rc.context({'suptitle.size': 13}, toplabelcolor='gray6', metawidth=1.5):
    fig = pplt.figure(figwidth=6, sharey='limits', span=False)
    axs = fig.subplots(ncols=2)

# Plot lines with a custom cycler
N, M = 100, 7
state = np.random.RandomState(51423)
values = np.arange(1, M + 1)
cycle = pplt.get_colors('grays', M - 1) + ['red']
for i, ax in enumerate(axs):
    data = np.cumsum(state.rand(N, M) - 0.5, axis=0)
    lines = ax.plot(data, linewidth=3, cycle=cycle)

# Apply settings to axes with format()
axs.format(
    grid=False, xlabel='xlabel', ylabel='ylabel',
    toplabels=('Column 1', 'Column 2'),
    suptitle='Rc settings demo',
    suptitlecolor='gray7',
    abc='[A]', abcloc='l',
    title='Title', titleloc='r', titlecolor='gray7'
)

# Reset persistent modifications from head of cell
pplt.rc.reset()

import proplot as pplt
import numpy as np
# pplt.rc.style = 'style'  # set the style everywhere

# Sample data
state = np.random.RandomState(51423)
data = state.rand(10, 5)

# Set up figure
fig, axs = pplt.subplots(ncols=2, nrows=2, span=False, share=False)
axs.format(suptitle='Stylesheets demo')
styles = ('ggplot', 'seaborn', '538', 'bmh')

# Apply different styles to different axes with format()
for ax, style in zip(axs, styles):
    ax.format(style=style, xlabel='xlabel', ylabel='ylabel', title=style)
    ax.plot(data, linewidth=3)


SciencePlots

安装

# to install the lastest release (from PyPI)
pip install SciencePlots

# to install the latest commit (from GitHub)
pip install git+https://github.com/garrettj403/SciencePlots

# to clone and install from a local copy
git clone https://github.com/garrettj403/SciencePlots.git
cd SciencePlots
pip install -e .

根据系统不同,需要提前安装latex环境

例子

import numpy as np
import matplotlib
import matplotlib.pyplot as plt
matplotlib.style.reload_library()
matplotlib.rcParams['axes.unicode_minus'] = False

def model(x, p):
    return x ** (2 * p + 1) / (1 + x ** (2 * p))

pparam = dict(xlabel='Voltage (mV)', ylabel='Current ($\mu$A)')

x = np.linspace(0.75, 1.25, 201)
with plt.style.context(['science']):
    fig, ax = plt.subplots()
    for p in [10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    # ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig1.pdf')
    fig.savefig('figures/fig1.jpg', dpi=300)
with plt.style.context(['science', 'ieee', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 20, 40, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # Note: $\mu$ doesn't work with Times font (used by ieee style)
    ax.set_ylabel(r'$Current (\mu A)$')  
    # fig.savefig('figures/fig2a.pdf')
    fig.savefig('figures/fig2a.jpg', dpi=300)


with plt.style.context(['science', 'ieee', 'std-colors', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # Note: $\mu$ doesn't work with Times font (used by ieee style)
    ax.set_ylabel(r'$Current (\mu A)$')  
    # fig.savefig('figures/fig2b.pdf')
    fig.savefig('figures/fig2b.jpg', dpi=300)

with plt.style.context(['science', 'high-vis', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig4.pdf')
    fig.savefig('figures/fig4.jpg', dpi=300)

png

with plt.style.context(['dark_background', 'science', 'high-vis', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig5.pdf')
    fig.savefig('figures/fig5.jpg', dpi=300)


with plt.style.context(['science', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig10.pdf')
    fig.savefig('figures/fig10.jpg', dpi=300)


with plt.style.context(['science', 'bright', 'notebook']):
    fig, ax = plt.subplots()
    for p in [5, 10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig6.pdf')
    fig.savefig('figures/fig6.jpg', dpi=300)



with plt.style.context(['science', 'muted', 'notebook']):
    fig, ax = plt.subplots()
    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100, 500]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order', fontsize=7)
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig8.pdf')
    fig.savefig('figures/fig8.jpg', dpi=300)

with plt.style.context(['science', 'grid', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 15, 20, 30, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig11.pdf')
    fig.savefig('figures/fig11.jpg', dpi=300)


with plt.style.context(['science', 'high-contrast', 'notebook']):
    fig, ax = plt.subplots()
    for p in [10, 20, 50]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order')
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig12.pdf')
    fig.savefig('figures/fig12.jpg', dpi=300)

with plt.style.context(['science', 'light', 'notebook']):
    fig, ax = plt.subplots()
    for p in [5, 7, 10, 15, 20, 30, 38, 50, 100]:
        ax.plot(x, model(x, p), label=p)
    ax.legend(title='Order', fontsize=7)
    ax.autoscale(tight=True)
    ax.set(**pparam)
    # fig.savefig('figures/fig13.pdf')
    fig.savefig('figures/fig13.jpg', dpi=300)


参考资料

  • https://proplot.readthedocs.io
  • https://github.com/garrettj403/SciencePlots
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

两个画图工具助力论文绘图 的相关文章

  • ros CMakeLists.txt template

    这里记录一个使用ros的CMakeLists txt的模板 xff0c 方便以后套用 示例 cmake minimum required VERSION 3 0 2 project rs parse set CMAKE CXX FLAGS
  • python 读取csv文件绘图

    python 读取csv文件数据 xff0c 然后通过plot绘图 bin bash python import csv import numpy as np from matplotlib import pyplot as plt col
  • ros utest

    在ros框架下编写代码 xff0c 在CMakeLists txt配置好之后 xff0c 在编译的时候执行下面指令即可生成测试代码的可执行文件 catkin make run tests 代码发布前 xff0c 测试用例一定要做好 xff0
  • boost 创建文件夹

    这里记录下如何使用boost创建文件夹的方法 主要步骤 包含filesystem头文件 include lt boost filesystem hpp gt 检测传入的文件目录 log path 是否存在 xff0c 目录不存在的话会新建一
  • GVINS论文阅读笔记

    Code Pseudorange Measurement c o d e p s e
  • matlab 读取csv文件绘图

    话不多说 xff0c 直接上代码 读取csv文件然后绘图 clc data 61 csvread 39 home lyb tools matlab files test csv 39 x 61 data 1 y 61 data 2 t 61
  • vins-mono初始化代码分析

    大体流程 初始化主要分成2部分 xff0c 第一部分是纯视觉SfM优化滑窗内的位姿 xff0c 然后在融合IMU信息 这部分代码在estimator processImage 最后面 主函数入口 xff1a void Estimator p
  • 浅谈嵌入式驱动设计

    一 总体说明 提到嵌入式的概念 xff0c 一时间脑容量已经容纳不下 xff0c 转到驱动的设计刚刚好 xff0c 习惯将一件事分层次去做 xff0c 驱动设计亦是如此 xff0c 很多人做工程时因为项目的时间紧张 xff0c 直接想到如何
  • 激光数据去畸变

    机械激光雷达产生数据原理 机械激光雷达中内置高速旋转的电机 xff0c 电机旋转的频率决定了激光雷达产生数据的频率 比如一个fov为360度的激光雷达 xff0c 每秒旋转一圈 xff0c 那么激光数据的频率就是1Hz xff1b 如果每秒
  • rosbag 录包

    ros提供了方便的录包指令 xff0c 基本使用如下 xff1a rosbag record topic 1 topic 2 这里记录下 xff0c 类似于滑动窗口的方式录制指定size的N个bag包 这主要用于只录制最近一段时间的数据包
  • pyhon记录cpu数据并保存到日志

    import logging import psutil time import re string log filename 61 34 logging txt 34 log format 61 39 asctime s message
  • ubuntu 修改重启时间

    ubuntu 默认重启时间过长 xff0c 默认为90s xff08 太久了 xff09 xff0c 下面为修改重启时间的正确姿势 cd etc systemd sudo vim system conf 打开文件后将下面这两行取消注释并修改
  • 数据分析实战(一):2019北大软微考研初试分析

    2019考研的初试成绩陆续放出 xff0c 也是几家欢喜几家愁 北大确实公平公正公开 xff0c 所有成绩 xff0c 排名在其研招网均能悉数找到 xff0c 下面选取了较为热门的北大软件与微电子学院考研初试成绩进行数据分析 导入excel
  • 程序员如何写项目经历

    对于程序员的简历来说 xff0c 简历的好坏可能影响着你能不能拿到满意的offer和薪资 xff0c 所以写一份高质量的简历 xff0c 突出自己技术能力非常重要 xff0c 就大家如何写简历中最重要的项目经历部分给出一些建议 了解项目的背
  • TypeError: iter() returned non-iterator of type ‘xxx‘

    最近在读 Python高级编程 xff08 Ziade著 xff09 xff0c 看到里面的自我设计的迭代器 xff1a 自己写的 xff1a span class token keyword class span span class t
  • memcpy与memmove函数的区别和实现

    1 函数定义 memcpy与memmove都是C语言的库函数 xff0c 在头文件string h中 xff0c 作用是内存拷贝 唯一的区别是 xff0c 当内存发生局部重叠时 xff0c memmove保证了拷贝的结果是正确的 xff0c
  • C语言strstr()函数用法-字符串查找

    1 函数定义 strstr 函数是一个参数为两个字符指针类型 xff0c 返回值是char 类型的函数 用于找到子串 xff08 str2 xff09 在一个字符串 xff08 str1 xff09 中第一次出现的位置 xff08 不包括s
  • "XXXX" is not translated in "en" (English), "zh" (Chinese)

    http www jianshu com p 39cd21451f06 Android Lint 34 XXXX 34 is not translated in 34 en 34 English 34 zh 34 Chinese 字数269
  • Qt之make: Nothing to be done for ‘first‘

    今天在修改了pro cpp h等文件 xff0c 重新编译时 xff0c 出现了标题所示的内容 如下图1所示 和同事讨论了一下 xff0c 主要有几个问题 xff0c 可能导致make不成功 1 xff09 工程文件内容没有变化 xff0c

随机推荐

  • cannot open shared object file: No such file or directory

    在一台Linux上编译库文件和执行文件后 xff0c 放到另一台Linux机器上 xff0c 执行报错 xff0c 显示 xff1a cannot open shared object file No such file or direct
  • C++ float转换int,四舍五入

    正常的float 转换为 int 的情况是采用去尾巴的方式 xff0c 也就是说去掉小数点后面的数值 1 常规的float 转换为 int xff1a 例如 xff1a 9 34 61 xff08 int xff09 9 xff1b 9 9
  • 如何隐藏QTabWidget中的一个tab

    QTabWidget 中的tab xff0c 采用hide xff0c close xff0c setHidden true xff0c setVisible false 等方式都无法隐藏tab 可以通过以下方式隐藏 ui gt tabWi
  • C++排序之stable_sort()的方法

    stable sort 可以对vector的某个成员进行排序 xff0c 而且可保证相等元素的原本相对次序在排序后保持不变 下面是该函数的实现方法代码 xff1a include lt iostream gt include lt math
  • QString和QDateTime之间的相互转换

    1 QDateTime 转换为QString QString strBuffer QDateTime time time 61 QDateTime currentDateTime strBuffer 61 time toString 34
  • QDateEdit日历修改之QCalendarWidget 样式设置

    1 QDateEdit控件显示日历 xff0c 需要用下面的setCalendarPopup true xff1b ui dateEdit gt setCalendarPopup true 2 日历样式的修改需要用到QCalendarWid
  • 解决ssh连接远程机器时提示“ssh_exchange_identification: Connection closed by remote host”或 Connection refused

    不少人在ssh连接远程机器时遇到过ssh exchange identification Connection closed by remote host的问题 xff0c 在网上找了一堆教程试了都不行 xff0c 博主总结了常见的几种解决
  • 百度地图POI数据获取并转为Excel文件

    查看全文百度地图POI数据获取并转为Excel文件
  • HAL库版STM32双轮自平衡车(四) ———— 原理图以及PCB绘制

    系列文章目录 HAL库版STM32双轮自平衡车 一 代码思路和PID基础精讲 HAL库版STM32双轮自平衡车 二 CubeMX的配置 原理图接线 物料准备 HAL库版STM32双轮自平衡车 三 代码精讲 HAL库版STM32双轮自平衡车
  • 关于VR的历史及发展

    寒假我看了关于一些虚拟现实的东西 xff0c 并在网上查获了一些资料 xff0c 作出以下归纳总结 xff1a 虚拟现实 xff0c 无法绕开它的历史 xff0c 最早可以追溯到公元前427年的古希腊时代 xff0c 当时的哲学家柏拉图在提
  • 机器人RPY角和Euler角 -- 基本公式

    参考 xff1a 机器人学 熊有伦等 编著 机械工业出版社 P36 P40 说明 xff1a 假设两个坐标系A和B xff0c 二者初始时完全重合 一 绕定轴X Y Z旋转 xff08 RPY角 xff09 过程如下 xff1a B绕A的X
  • solvepnp函数-世界坐标系

    一 二 世界坐标系是任意选定的 xff0c 可以任意事先定义 xff0c 然后给出每个特征点在世界坐标系下的三维坐标 xff0c 然后以一定顺序存储这些点 特征点的像素坐标 xff0c 一般是通过角点检测算法直接得到的 xff0c 角点检测
  • 【C++】STL-迭代器

    Iterator xff08 迭代器 xff09 模式又称游标 xff08 Cursor xff09 模式 xff0c 就是把不同集合类的访问逻辑抽象出来 xff0c 使得不用暴露集合内部的结构而达到循环遍历集合的效果 xff0c 而又不需
  • Windows11 + Linux子系统(ubuntu)体验(篇一)

    今年10月份微软发布了新一代的Windows系统 Windows11 xff0c 这距离上一代产品Windows10发布已经有6年之久 xff0c 打破了微软自Windows7之后每三年更新一代操作系统的传统 可以说这一代Win11是蓄势已
  • 喜获蚂蚁offer,定级p7,面经分享,万字长文带你走完面试全过程

    前言 在今天 xff0c 我收到了蚂蚁金服A级的实习录用offer 从开始面试到拿到口头offer xff08 四面技术 43 一面HR xff09 战线大约拉了半个月 xff0c 从拿到口头offer到收到正式录用邮件大概又是半个月 思前
  • C++中 #define的用法

    C 43 43 中 define的用法 转自 xff1a http www dingge com main article asp id 61 10 今天整理了一些 define的用法 xff0c 与大家共享 xff01 1 简单的defi
  • LeetCode的语言使用

    看来以后不能再用python来写算法的题目了 用python竟然是一种取巧的办法 xff0c 以后还是用C 43 43 来写吧 python里面有很多内置的库 xff0c 这也就导致掩盖了很多复杂的算法的特性 虽然在写代码的时候很简单 xf
  • Windows10安装Ubuntu16.04

    由于最近要在Ubuntu上面开发 xff0c 得安装一个Ubuntu的系统 xff0c 这些是很常见的安装 xff0c 但是也踩了一些坑 xff0c 下面记录下来 安装环境 Windows10Ubuntu16 04 基础理论 在安装的时候有
  • python 下划线 _ __ 开头的变量 详解

    在python中 xff0c 我们经常能看到很多变量名以 下划线开头 xff0c 而且下划线的数量还不一样 xff0c 那么这些变量的作用到底是什么 xff1f 变量名分类 xff1a 以数字 字母开头 xff1a 正常的公有变量名 a 6
  • 两个画图工具助力论文绘图

    欢迎关注笔者的微信公众号 如果使用matplotlib绘制论文图片时需要做非常多的设置 xff0c 字体 xff0c 大小 xff0c 间距 xff0c 多子图配置等 xff0c 而这些操作可以封装好从而简化用户工作量 Proplot对ma