There is a sister package PGFPlots that you can use to plot figures. It produces high quality figures, in my view much better than matplotlib, in part because it’s integrated with latex.
It’s worth mentioning that drawing complex diagrams with Tikz can take time. You need to code such that the plot is flexible if later you make a change, as much as possible.
The advantage of GnuPlot is speed, and for quick 2D plots from terminal. It’s the fastest plotter that I have seen.
The output is also good, more so with latex terminal. However, Tikz/PGFplots is much more adjustable, has broader scope, and overall a much better tool for plotting.
GnuPlot syntax is also archaic, and documentation is scant.
As mentioned above, you can use GnuPlot backend to compute the function. At that point, pgfplots is well positioned to render an excellent plot!
It’s worth mentioning that drawing complex diagrams with Tikz can take time. You need to code such that the plot is flexible if later you make a change, as much as possible.