Forum Navigation
You need to log in to create posts and topics.

Use OVITO to plot line chart (cluster size versus timesteps)

Hi all !

I'm working on a experiment ,which need to trace cluster size changing in a period of time. I know how to use cluster analysis and the python script used to calculate the number of cluster size per frame, but just don't quite have the result that I wanted.      I've seen other researchers plotted some line charts with OVITO looks like image I uploaded.

What can I do to plot such a line chart like this by OVITO, do I need to use other software (such as EXCEL)?

 

Uploaded files:
  • 未命名.jpg

Hi,

can you elaborate what you mean by 'you don't get the result you wanted'? Also, are you using the GUI or the scripting interface of OVITO? Both can be used to calculate the time evolution of different cluster sizes but for plotting you would need to export that data as text-file and use your usual plotting tool. If you're using a python script then matplotlib could be an option for you to produce an image as shown above.

-Constanze

 

 

I use the scripting interface of OVITO, and my output files looks like this. Those numbers are the cluster sizes and those file are data per frame.  I'm still trying to make these data combined and can be plot into line charts.   What I want to know is that do you have a better way to do this? because I'm not good at excel, Thanks!

Uploaded files:
  • 註解-2019-09-17-095306.png
  • 註解-2019-09-17-095405.png

If you're using the scripting interface of OVITO then there's no need to export all that data. You can directly plot it in your python script using the python plotting library matplotlib, see https://matplotlib.org/ for more details. You should also have a look at their tutorials https://matplotlib.org/tutorials/introductory/pyplot.html#sphx-glr-tutorials-introductory-pyplot-py.

If you need help integrating that into your script you can upload it here. Then I can give you more specific directions.

-Constanze

 

新的OVITO微信频道!
New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.