Is there a way to exclude some nodes from the graph?

I’m editing the title because I originally thought you wanted something different. Have a look at this: