#2691 plot2d style broken in 5.32


The style option in (wx)plot2d has accepted empty brackets [] before to use the default style for that element. Since version 5.32 this doesn't work anymore.

This feature is very useful if you i.e. want to plot multiple functions and some point, because the different colors for the functions don't need to be set manually.

A minimal example:

This code works with version 5.31.0 but fails with 5.32.1.

The error message is:
Wrong argumet [] for option style. Not a valid style.
-- an error. To debug this try: debugmode(true);

As this was working in older versions I consider this behavior a bug.

My Platform is x86-64 with Arch Linux.


  • Hi,
    thanks for your message. Versions previous to 5.32 did not check the options given to plot2d and in some cases that led to unexpected errors. 5.32 introduced a new function to check plot options.
    Since the [style,[]] hack that you used was not documented, I do not consider it a bug; however, I will regard it as a new feature request: implementation of a way to ask for default values.
    Passing an empty list to get the default value seems to me very odd. Perhaps it would be better to accept a keyword such as "default"? Any other ideas?

    Best regards,

    • labels: bug --> bug, plotting
    • assigned_to: Jaime E. Villate
  • Robert Dodier
    Robert Dodier

    Thanks for taking the time to make a report. I'm closing this report as "wont-fix" since it is not a bug.

  • Robert Dodier
    Robert Dodier

    • status: open --> wont-fix