bobleesj / cifkit

High-throughput .cif analysis made easy. Visit: https://bobleesj.github.io/cifkit/
https://bobleesj.github.io/cifkit/
MIT License
11 stars 0 forks source link

Remove warning for using categorical units to plot a list of strings for histogram generation #11

Closed bobleesj closed 1 month ago

bobleesj commented 1 month ago

Checklist

Describe the bug

For the histogram generations with coordination numbers, the following warning should be removed.

2024-07-06 11:31:18,905 - INFO - Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
2024-07-06 11:31:18,905 - INFO - Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
bobleesj commented 1 month ago
Screenshot 2024-07-06 at 11 35 54 AM

The coordination number x-axis should be integer values.

Furthermore, how is it possible to have such a low value CN value of around 3? I need to investigate this.

bobleesj commented 1 month ago

For the histogram generations with coordination numbers, the following warning should be removed.

This is fixed in 1.0.2

Furthermore, how is it possible to have such a low value CN value of around 3? I need to investigate this.

This is not yet discussed.

bobleesj commented 1 month ago
Screenshot 2024-07-09 at 7 30 15 PM Screenshot 2024-07-09 at 7 30 21 PM
# y-axis
plt.gca().yaxis.set_major_locator(MaxNLocator(integer=True))

# x-axis
int_keys = sorted(map(int, keys))
plt.xticks(
range(min(int_keys), max(int_keys) + 1)
)
plt.gca().xaxis.set_major_locator(MaxNLocator(integer=True))

x- and y-axis integer problem is fixed in 1.0.2.