# Suggestion for getting a type of plot

I am planning to use python to get a plot like this .

But, I am only able to get this,

So, I would appreciate it if someone helps me with this issue, (Maybe how to format the data): How to have lower X-axis values highlighted like in the original plot.

Please check the code below and looking forward to your suggestions. Numpy and Matplotlib are being used.

x = [192, 188/4, 168/24, 144/48, 96/96]
ys = [[2.20, 0.758, 0.691], [1.44, 0.708, 0.733], [0.491, 0.379, 0.440], [0.349, 0.350, 0.165], [0.199, 0.157, 0.163]]

print(len(x), len(ys))
colors = [["r", "y", "g"], ["r", "y", "g"], ["r", "y", "g"], ["r", "y", "g"], ["r", "y", "g"]]
print(colors)

for y, x, c in zip(ys, x, colors):
#     print(y, [x])
#     print([x]*len(y))
plt.scatter([x]*len(y), y, color = c)

plt.xticks([192, 188/4, 168/24, 144/48, 96/96])
plt.xlabel("Si/Al Ratio")
plt.ylabel("Diff Coeff (Ang**2)")
# plt.legend(['Water_Cubic{}'.format(i) for i in [12, 24, 48]], loc=2, bbox_to_anchor=(1.05, 1), borderaxespad=0., fontsize=11)
plt.title("Si/Al vs Diff Coeff at 300k for Water Content (12, 24, 48)")
• I'm maybe not understanding the question. I don't see any highlighted values in the upper plot. Do you just want different values for the xticks? You are setting these manually, so you can either specify a different set of these or let matplotlib set them automatically based on your x values.
– Tyberius
Jul 13, 2022 at 12:30
• This question is not related to Materials modeling and instead should be asked on e.g. StackOverflow. Jul 19, 2022 at 22:44
• @PeterSchindler it was asked on SO: stackoverflow.com/q/72959365/1271772 Jul 21, 2022 at 14:36
• This was both asked and answered on SO around the same time as you asked the question here. Please refrain from cross posting questions on multiple SE, as this makes it difficult for users to know where else a question has been asked and leads to duplicated effort when providing answers. At a minimum, you should include a link to any alternate versions of your question on other sites.
– Tyberius
Jul 21, 2022 at 17:35
• @B.Kelly What plotting library can? Jul 23, 2022 at 0:11