How to make a plot that groups different type of nodes by cluster?

This is the graph object, please see the documentation. I have not used any data, this is just an example. You should construct the graph G yourself by using graph_from_data_frame, as said.