I don't think generating pgfplots graphics counts as a derived work, as long as you are not distributing parts of the pgfplots source code. Otherwise every document that uses pgfplots would automatically be GPL-3.0-or-later, which is probably not what the author intended.
Source: I have a tiny bit of copyright on pgfplots, https://github.com/pgf-tikz/pgfplots/commits?author=hmenke