认识 Plots：一款适用于 Linux 桌面的数学图形绘图应用
绘图 数学
![](/data/attachment/album/202102/25/140338su2fju6016t5q2tz.jpg)


Plots 是一款图形绘图应用，它可以轻松实现数学公式的可视化。你可以用它来绘制任意三角函数、双曲函数、指数函数和对数函数的和与积。


### 在 Linux 上使用 Plots 绘制数学图形


[Plots](https://github.com/alexhuntley/Plots/) 是一款简单的应用，它的灵感来自于像 [Desmos](https://www.desmos.com/) 这样的 Web 图形绘图应用。它能让你绘制不同数学函数的图形，你可以交互式地输入这些函数，还可以自定义绘图的颜色。


Plots 是用 Python 编写的，它使用 [OpenGL](https://www.opengl.org/) 来利用现代硬件。它使用 GTK 3，因此可以很好地与 GNOME 桌面集成。


![](/data/attachment/album/202102/25/140348joyulfknyfxunzii.png)


使用 Plots 非常直白。要添加一个新的方程，点击加号。点击垃圾箱图标可以删除方程。还可以选择撤销和重做。你也可以放大和缩小。


![](/data/attachment/album/202102/25/140349s32i6rz3ck1fftss.png)


你输入方程的文本框是友好的。菜单中有一个“帮助”选项可以访问文档。你可以在这里找到关于如何编写各种数学符号的有用提示。你也可以复制粘贴方程。


![](/data/attachment/album/202102/25/140350j3z02l900e2cyh7a.png)


在深色模式下，侧栏公式区域变成了深色，但主绘图区域仍然是白色。我相信这也许是这样设计的。


你可以使用多个函数，并将它们全部绘制在一张图中：


![](/data/attachment/album/202102/25/140352s0jpsjyal3zhw999.png)


我发现它在尝试粘贴一些它无法理解的方程时崩溃了。如果你写了一些它不能理解的东西，或者与现有的方程冲突，所有图形都会消失，去掉不正确的方程就会恢复图形。


不幸的是，没有导出绘图或复制到剪贴板的选项。你可以随时 [在 Linux 中截图](https://itsfoss.com/take-screenshot-linux/)，并在你要添加图像的文档中使用它。


### 在 Linux 上安装 Plots


Plots 为各种发行版提供了不同的安装方式。


Ubuntu 20.04 和 20.10 用户可以[使用 PPA](https://itsfoss.com/ppa-guide/)：



```
sudo add-apt-repository ppa:apandada1/plots
sudo apt update
sudo apt install plots

```

对于其他基于 Debian 的发行版，你可以使用 [这里](https://launchpad.net/~apandada1/+archive/ubuntu/plots/+packages) 的 [deb 文件安装](https://itsfoss.com/install-deb-files-ubuntu/)。


我没有在 AUR 软件包列表中找到它，但是作为 Arch Linux 用户，你可以使用 Flatpak 软件包或者使用 Python 安装它。


* [Plots Flatpak 软件包](https://flathub.org/apps/details/com.github.alexhuntley.Plots)


如果你感兴趣，可以在它的 GitHub 仓库中查看源代码。如果你喜欢这款应用，请考虑在 GitHub 上给它 star。


* [GitHub 上的 Plots 源码](https://github.com/alexhuntley/Plots/)


### 结论


Plots 主要用于帮助学生学习数学或相关科目，但它在很多其他场景下也能发挥作用。我知道不是每个人都需要，但肯定会对学术界和学校的人有帮助。


不过我倒是希望能有导出图片的功能。也许开发者可以在未来的版本中加入这个功能。


你知道有什么类似的绘图应用吗？Plots 与它们相比如何？




---


via: <https://itsfoss.com/plots-graph-app/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Plots is an [open source graph plotting application](https://itsfoss.com/open-source-plotting-apps/) that makes it easy to visualize mathematical formulae. You can use it for trigonometric, hyperbolic, exponential and logarithmic functions along with arbitrary sums and products.

## Plot mathematical graphs with Plots on Linux

[Plots](https://github.com/alexhuntley/Plots/) is a simple application inspired by graph plotting web apps like [Desmos](https://www.desmos.com/). It allows you to plot graphs of different math functions, which you can enter interactively, as well as customizing the color of your plots.

Written in Python, Plots takes advantage of modern hardware using [OpenGL](https://www.opengl.org/). It uses GTK 3 and thus integrates well with the GNOME desktop.

![fourier graph plots](https://itsfoss.com/content/images/wordpress/2021/02/fourier-graph-plots-800x492.png)

Using plots is straightforward. To add a new equation, click the plus sign. Clicking the trash icon deletes the equation. There is also the option to undo and redo. You can also zoom in and zoom out.

![Graph plotting apps for Linux](https://itsfoss.com/content/images/wordpress/2021/02/plots-app-linux-1-800x518.png)

The text box where you type is equation friendly. The hamburger menu has a ‘help’ option to access the documentation. You’ll find useful tips on how to write various mathematical notations here. You can also copy-paste the equations.

![plots app linux](https://itsfoss.com/content/images/wordpress/2021/02/plots-app-linux-800x527.png)

In dark mode, the sidebar equation area turns dark but the main plotting area remains white. I believe that’s by design perhaps.

You can use multiple functions and plot them all in one graph:

![multiple equations plots](https://itsfoss.com/content/images/wordpress/2021/02/multiple-equations-plots-800x492.png)

I found it crashing while trying to paste some equations it could not understand. If you write something that it cannot understand or conflicts with existing equations, all plots disappear, Removing the incorrect equation brings back the plot.

No option to export the plots or copy them to clipboard unfortunately. You can always [take screenshots in Linux](https://itsfoss.com/take-screenshot-linux/) and use the image in your document where you have to add the graphs.

**Recommended Read:**

## Installing Plots on Linux

Plots has different installation options available for various kinds of distributions.

Ubuntu 20.04 and 20.10 users can [take advantage of the PPA](https://itsfoss.com/ppa-guide/):

```
sudo add-apt-repository ppa:apandada1/plots
sudo apt update
sudo apt install plots
```


For other Debian based distributions, you can [install it from the deb file](https://itsfoss.com/install-deb-files-ubuntu/) available [here](https://launchpad.net/~apandada1/+archive/ubuntu/plots/+packages).

For Arch users, [Plots has been added to AUR](https://aur.archlinux.org/packages/plots/) after this article was published.

Apart from that, you can also use the Flatpak package or install it using Python.

If interested, you may check out the source code on its GitHub repository. If you like the application, please consider giving it a star on GitHub.

**Conclusion**

The primary use case for Plots is for students learning math or related subjects, but it can be useful in many other scenarios. I know not everyone would need that but surely helpful for the people in the academics and schools.

I would have liked the option to export the images though. Perhaps the developers can add this feature in the future releases.

Do you know any similar applications for plotting graphs? How does Plots stack up against them?