Menu

#2796 replot of multiplot fails with "unexpected or unrecognized token:"

None
closed-fixed
nobody
None
2025-06-04
2025-05-12
No

Hello,

I regularly use replot in my scripts, e.g., for creating an image of the plot or for replotting periodically updated data.

replot also works with multiplots.
However, replot fails with multiplots when the command is followed by another command. Let me explain by examples.

This code works:

plot sin(x)*rand(0)
while (1) { replot ; pause 1 ; }

This code fails:

set multiplot layout 2,1
plot sin(x)*rand(0)
plot cos(x)*rand(0)
unset multiplot
while (1) { replot ; pause 1 ; }

with

gnuplot> replot ; pause 1 ;
                  ^
         unexpected or unrecognized token: pause

Why is this? What can I do about it?
Thanks.
Daniel

Discussion

  • Ethan Merritt

    Ethan Merritt - 2025-05-13

    Ticket moved from /p/gnuplot/support-requests/301/

    Can't be converted:

    • _milestone:
    • _priority: 5
     
  • Ethan Merritt

    Ethan Merritt - 2025-05-13

    It's a bug.
    The fix is probably simple but for now...

    Work-around:
    Put an extra semicolon after the replot command.
    while (1) { replot ;; pause 1 }

     
    👍
    1
    • Daniel Dan K.

      Daniel Dan K. - 2025-05-13

      Thanks, Ethan, for providing a workaround so quickly. That's helpful.

       
  • Ethan Merritt

    Ethan Merritt - 2025-05-13
    • status: open --> pending-fixed
    • Group: -->
    • Priority: 5 -->
     
  • Ethan Merritt

    Ethan Merritt - 2025-06-04
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.