Currently, the panplot command does not support the --outbuf option. Thus, one cannot create panel-plots using the new gridplot framework. Here is the documentation:
https://gretl.sourceforge.net/gretl-help/cmdref.html#panplot
Having this feature would be useful of one works with panel data.
Thank you
Artur
Sorry, Artur, it's not true that gridplot cannot be used. That's why the gpbuild ... end gpbuild variant exists.
Good point, Sven! What you have in mind is:
And that, indeed, works.
Ok, I should re-specify what I ask for. The use-case is that one writes a function where you pass a list of k variables and one loops over that list to collects panel-plots. This array is then passed to the
gridplotcommand.Using
gpbuildrequires to specify explicitly your commands for each series.I just saw that the
boxplotcommand also does not support the--outbufoption:https://gretl.sourceforge.net/gretl-help/cmdref.html#boxplot
Yes, there are many commands that do not. This whole issue was discussed when introducing gridplot and so on. Here's what I believe is the recommended solution:
Very nice. That works! Thank you.
Question: Shall we close the ticket? But then this circumvention should be documented, I think.
boxplothas supported the outbuf option for some time now (though that's not stated in the help text).panplotwas supposed to support outbuf but was not actually hooked up to do so; that's now fixed in git.Thank you, Allin!
So is the idea now to have --outbuf available for every relevant command?
The only remaining issue is documentation...
To be clear, there are several plotting commands that aren't documented as supporting the outbuf option, although they do (tested with 2024a):
That's true, but what actually is the use case? Now that we have gpbuild and gridplot I can't offhand think of much use for this option, which was introduced as a convenience for multiplot.gfn. Personally, I'd be more inclined to remove the option in those cases than to document it. But it could remain, undocumented, if there's an obscure use case that we ought to preserve.
Just for understanding you correctly, Allin:
You're arguing that there is no need for the
--outbufoption -- for instance for thepanplotcommand -- as the user can always run the approach proposed by Sven? Concrete: Store the output as a plt file and read-in its content:~~~
panplot $i --overlay --output="mytemp$i.plt"
ps[i] = readfile("mytemp$i.plt")
~~~
Artur
From the documentation, in a gpbuild ... end gpbuild block you don't need temp files, the needed strings array is filled automatically. It's not totally clear to me whether a loop is also allowed inside a gpuild block, however. (Don't have time for testing myself right now.)
Indeed loops are supported, so the updated example above on how to use the stuff without the --outbuf option would probably be (tested):
It was discussed that for special and pretty advanced usage the outbuf option could stay, but would not be heavily documented. Perhaps only in the context of the gnuplot command entry. In that sense this ticket could probably be closed; perhaps the implication is that some documentation would actually have to be removed.
OK, as discussed before what remained to be done was to leave the documentation of the outbuf option only for the gnuplot and plot (and partly gridplot) commands, and do not advertise it actively in all the other plotting commands. (Because you can always use the temp file approach there, and if you're really clever, outbuf should still work.)
That has now been done, and so I'm closing this.