Looking at the additional ways this was failing, this is almost certainly the same bug as 2491.
It may be related to that commit. Looking at the bug notes, I tried to pipe the gnuplot script into gnuplot (removing Python from the equation), and got an error suggesting that the second line of the script is parsed funny. It produced the error message t multiplot layout 2,2 title "test"; line 0: invalid command (see attached screenshot). I bet this is also why the Python script didn't work. Trying both Windows and Linux type EOL's did not change the behavior. It seems whatever is on this second...
It may be related to that commit. Looking at the bug notes, I tried to pipe the gnuplot script into gnuplot (removing Python from the equation), and got an error suggesting that the second line of the script is parsed funny. It produced the error message t multiplot layout 2,2 title "test"; line 0: invalid command (see attached screenshot). I bet this is also why the Python script didn't work. Trying both Windows and Linux type EOL's did not change the behavior. It seems whatever is on this second...
Multiplot not working when piped in from an external program
It may be related to that commit. Looking at the bug notes, I tried to pipe the gnuplot script into gnuplot (removing Python from the equation), and got an error suggesting that the second line of the script is parsed funny. It produced the error message t multiplot layout 2,2 title "test"; line 0: invalid command (see attached screenshot). I bet this is also why the Python script didn't work. Trying both Windows and Linux type EOL's did not change the behavior. It seems whatever is on this second...
It may be related to that commit. Looking at the bug notes, I tried to pipe the gnuplot script into gnuplot (removing Python from the equation), and got an error suggesting that the second line of the script is parsed funny. It produced the error message t multiplot layout 2,2 title "test"; line 0: invalid command (see attached screenshot). I bet this is also why the Python script didn't work. Trying both Windows and Linux type EOL's did not change the behavior. It seems whatever is on this second...
It is possible that it is unique to Windows. I don't have any other OS available to test, but it did work correctly under the older version of gnuplot on my machine but does not run under the new version. If you can't reproduce under Linux, I would suspect that it is somewhere in the Windows specific code. What seems odd is that moving that multiplot command to the previous line: gp.stdin.write(b'set term pdf; set output "test.pdf"; set multiplot layout 2,2 title "test"\n') works to trigger multiplot,...
Edited as the wrong python script was attached.