Closed fdeugenio closed 1 year ago
Hi there! Thanks for rasing this issue. I tested it using the latest version of smplotlib
on pip (https://pypi.org/project/smplotlib/), and I got the following figure without the problem that you reported:
Maybe can you try to upgrade the package by pip install smplotlib -U
?
I tried that but get the same results, differently from what you display. I have this setup matplotlib 3.7.1 smplotlib 0.0.8 Python 3.10.9
Okay I was using a much older version of matplotlib. And I can reproduce your issue when using matplotlib 3.7.1. I'll try to fix it later. Thanks for raising the issue!
Hi @fdeugenio! I think I've fixed the problem. The figure below is generated using the latest smplotlib==0.0.9
and the following code:
import numpy as np
v = np.arange(10)
plt.scatter(v, v, c=v)
plt.text(5.5, 2, r'Normal Text', fontsize=18)
plt.text(5.5, 2.5, r'$\mathbf{mathbf}$', fontsize=18)
plt.text(5.5, 3, r'$\mathit{mathit}$', fontsize=18)
plt.text(5.5, 3.5, r'$\mathsf{mathsf}$', fontsize=18)
plt.text(5.5, 4, r'$\mathtt{mathtt}$', fontsize=18)
This demonstrates the different types of fonts in the Hershey font family. If you don't like the black edge around the data points, you can turn it off by smplotlib.set_style(edgecolor='face')
. The default colormap is jet, to mimic those shining old figures, you know...
Awesome, thank you! I also learned about fillstyle
looking at your commit
Hi, great library! I was wondering whether you can create scatter plots with the symbols colour coded, e.g.:
With
smplotlib
, all symbols are empty white circles, but withoutsmplotlib
, the symbols are coloured. Perhaps this is a deliberate style choice, but just wanted to report in case it's not!