Author Topic: ScatterPlotModifier  (Read 52 times)

Haomin

  • Newbie
  • *
  • Posts: 6
ScatterPlotModifier
« on: July 30, 2018, 05:39:00 PM »
Dear Ovito users,

I am trying to create a scatter plot with python modifier. I noticed that in 3.0 version, there is a ScatterPlotModifier. Can anyone have a way to set the x-axis,y-axis as well as scatter size when ploting in python modifier?

Thanks,
Haomin

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 435
Re: ScatterPlotModifier
« Reply #1 on: July 31, 2018, 10:49:16 AM »
Dear Haomin,

Currently, the Python binding ScatterPlotModifier is not implemented. This Python class has no methods or properties that would allow controlling the modifier's settings from a script. The reason for this (deliberate) deficiency is that the plot produced by this modifier is only displayed in the graphical interface to the user. There is no way for the script to access the graphical plot.

But it would be easy to generate a scatter plot from a Python script using the matplotlib Python module directly from the particle property data. The ScatterPlotModifier is not needed in this case. Have you considered this alternative already?

-Alex

Haomin

  • Newbie
  • *
  • Posts: 6
Re: ScatterPlotModifier
« Reply #2 on: August 07, 2018, 04:39:27 PM »
Hello Alex,

Thanks for your suggestions, I tried matplotlib with python modifier in OVITO and it works. That fixes my problem.

Haomin