<p>You might want to check <a href="https://github.com/lava/matplotlib-cpp" rel="nofollow noreferrer">matplotlib-cpp</a>. You'll find a &quot;funny-looking xkcd-styled example&quot; in the README.</p>
<p>I also saw xkcd related entries on matplotlib's Python documentation. So, it should be available in Python too. However, I did not use these libraries myself. I just stumbled upon matplotlib-cpp while I was looking for a plotting library for C++.</p>

CC BY-SA 4.0
2020-12-20T16:54:27.183Z
This is neat and I will try it, although I am more interested in the technique itself.

i.e. I am looking for the algorithm not the software. But I can take a peek at the implementation of that package, thank you.
Makogan
CC BY-SA 4.0
2020-12-20T11:59:06.283Z
2020-12-21T13:24:05.973Z
2020-12-21T13:24:05.973Z
madbuggerswall
<p>How can I render plots and graphics that mimic how mathematicians draw diagrams?</p>
<p>For example Look at this shirt:</p>
<p><a href="https://i.sstatic.net/RJiSv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RJiSv.png" alt="enter image description here" /></a></p>
<p>The diagrams represent 2D and 3D shapes, however they have characteristics of human drawings. The curves are not perfect and exhibit lot's of noise and waviness that a computer rendering would normally not have.
If you know any papers regarding this topic, please add them as reference to your answer.</p>
<p>As a side note and perhaps somewhat off topic: Is there a C++ library that can do tex rendering onto textures?</p>

CC BY-SA 4.0
2020-12-17T05:25:00.210Z
Read: https://mathematica.stackexchange.com/questions/11350/xkcd-style-plots
joojaa
CC BY-SA 4.0
2020-12-18T00:12:18.813Z
"*Is there a C++ library that can do tex rendering onto textures?*" If you can generate pixel data from TeX, then you have everything you need to generate a texture from TeX.
Nicol Bolas
<rendering><shader><mathematics><shading><font-rendering>
Stylized math like rendering?
Makogan
# Stylized math like rendering?

(Asked by: username_0 on 2020-12-17)

How can I render plots and graphics that mimic how mathematicians draw diagrams?

For example Look at this shirt:

[![enter image description here](https://i.sstatic.net/RJiSv.png)](https://i.sstatic.net/RJiSv.png)

The diagrams represent 2D and 3D shapes, however they have characteristics of human drawings. The curves are not perfect and exhibit lot's of noise and waviness that a computer rendering would normally not have.
If you know any papers regarding this topic, please add them as reference to your answer.

As a side note and perhaps somewhat off topic: Is there a C++ library that can do tex rendering onto textures?

**Tags:** rendering, shader, mathematics, shading, font-rendering

> **Comments:**
> **username_1**: Read: https://mathematica.stackexchange.com/questions/11350/xkcd-style-plots  
> **username_2**: "*Is there a C++ library that can do tex rendering onto textures?*" If you can generate pixel data from TeX, then you have everything you need to generate a texture from TeX.  

---

## 1 answers

### Answer by username_3 on 2020-12-20. Score: 3 | Accepted answer

You might want to check [matplotlib-cpp](https://github.com/lava/matplotlib-cpp). You'll find a "funny-looking xkcd-styled example" in the README.

I also saw xkcd related entries on matplotlib's Python documentation. So, it should be available in Python too. However, I did not use these libraries myself. I just stumbled upon matplotlib-cpp while I was looking for a plotting library for C++.

> **Comments:**
> **username_0**: This is neat and I will try it, although I am more interested in the technique itself.  i.e. I am looking for the algorithm not the software. But I can take a peek at the implementation of that package, thank you.  

---

