You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to plot earthquake data as Time Series with PyVista, ideally having a slider or a sort of "play button" to start adding data. The data used for the slider would be the year the earthquake occured. So while time progresses, more and more events should appear in the plotting window.
Example Data
I have attached the sample data.
What I have accomplished so far is plotting each single event as sphere and adjust its size and color to the magnitude of the event. Is there a way to combine the single spheres like done for the lines in #310 and then somehow plot the data by year by adjusting a slider?
This is awesome and I want to provide some help but am lacking time at the moment. Hopefully, these tips help:
Is there a way to combine the single spheres like done for the lines in #310
Yep, you can either merge all the spheres into a single unstructured grid or put them all in a MultiBlock dataset. Since you already have the spheres as a list, you can just pass that to the MultiBlock constructor:
spheres=pv.MultiBlock([pv.Sphere(radius=data_df.loc[i]['Magnitude']*200, center=data_df.loc[i][['X', 'Y', 'Z']].tolist()) foriinrange(len(data_df))])
...
# Remove the for loop plottingp.add_mesh(spheres, scalars='Magnitude', cmap='Reds', clim=[0,6],scalar_bar_args=sargs)
then somehow plot the data by year by adjusting a slider?
See if you can create a multiblock like this for each year. Then track which data to show by having some sort of class that will hold all of that data and have callbacks for updating the data shown in the viewer.
Description
Hello,
I would like to plot earthquake data as Time Series with PyVista, ideally having a slider or a sort of "play button" to start adding data. The data used for the slider would be the year the earthquake occured. So while time progresses, more and more events should appear in the plotting window.
Example Data
I have attached the sample data.
What I have accomplished so far is plotting each single event as sphere and adjust its size and color to the magnitude of the event. Is there a way to combine the single spheres like done for the lines in #310 and then somehow plot the data by year by adjusting a slider?
Looking forward to some hints and tipps :)
earthquakes_aachen.txt
The text was updated successfully, but these errors were encountered: