Overlaying displacement plots
Hello,
Are there any commands or functions in Anastruct that allows to:
- Plot displacement with a color other than blue?
- Overlays two (or more) different displacement plots of the same structure?
Does anyone have any ideas to work around this problem if such commands are not available?
Cheers! Adam
@fazaghifari : No, we've not provided a way to customise the plots at this time; I'll mark this as an enhancement request, but unless you or someone else would like to add this functionality (I'd love more contributors!), it's probably not high on my priorities personally...
However, I can give you a bit of a workaround, and that's that most of anaStruct's internal variables are freely accessible to you. Once you've solved your system (say, in a variable called system), you can pull all the displacement data for each individual element as follows:
for element in system.element_map.values():
element_displacement = (
np.linspace(
element.node_1.uz,
element.node_2.uz,
num=len(element.deflection),
)
+ element.deflection
)
You'd probably want to collect those displacements from every element, and plot them together using matplotlib or any other plotter.