The plotting tool can plot any input coming over a ROS topic. Weights are not transmitted back to the frontend in any ROS topic unfortunately.
You have 2 solutions:
either you hack the code and create a ROS topic that feeds your weights to the frontend (non trivial)
or you don’t use plotting tools but plot to an image from within your transfer functions (called server-side plotting). This works nicely and you can plot whatever you want. Just import matplotlib or PIL (for example) and create your plotting utilities either in a file you push to the “Resources” pane, or directly in your transfer function and use in your transfer functions.
An excellent example of this can be found in the transfer function benchmark_evaluation.py from the benchmark_3pdx (aka “Benchmark Pioneer P3DX experiment”). To find this file, clone this experiment and click on its “Files” button, then download it.
You will see that this transfer function creates a ROS topic of type Image:
@nrp.MapRobotPublisher('benchmark_metrics', Topic('/benchmark/metrics', sensor_msgs.msg.Image))
function imports PIL and plots into an image which is written to this topic.
In the end, just opening the image viewer in the frontend will show you the live plotting.
Hope this helps,