From: Jaime E. V. <vi...@us...> - 2025-07-07 10:02:59
|
plot_options (a Maxima list) is not used by the plotting progams (plot2d, plot3d, julia, ...). The plotting options used by those programs are in a Lisp "property list" that can only be accessed in Maxima with the functions get_plot_option() and set_plot_option(). See the following example (after commit [b05e4e]): ~~~ (%i1) plot_options; (%o1) [[plot_format, gnuplot_pipes]] (%i2) get_plot_option(); (%o2) [[plot_format, gnuplot_pipes], [grid, 30, 30], [run_viewer, true], [axes, true], [nticks, 29], [adapt_depth, 5], [color, blue, red, green, magenta, black, cyan], [point_type, bullet, box, triangle, plus, times, asterisk], [palette, [hue, 0.33333333, 0.7, 1, 0.5], [hue, 0.8, 0.7, 1, 0.4]], [gnuplot_svg_background, white], [gnuplot_preamble, ], [gnuplot_term, default]] (%i3) set_plot_option([plot_format,xmaxima])$ (%i4) reset(plot_options)$ (%i5) plot_options; (%o5) [[plot_format, gnuplot_pipes]] (%i6) get_plot_option(); (%o6) [[plot_format, xmaxima], [grid, 30, 30], [run_viewer, true], [axes, true], [nticks, 29], [adapt_depth, 5], [color, blue, red, green, magenta, black, cyan], [point_type, bullet, box, triangle, plus, times, asterisk], [palette, [hue, 0.33333333, 0.7, 1, 0.5], [hue, 0.8, 0.7, 1, 0.4]], [gnuplot_svg_background, white], [gnuplot_preamble, ], [gnuplot_term, default]] ~~~ As explained in the source code (src/plot.lisp), The plotting options are now in a Lisp list \*plot-options\* which should not be changed directly from Maxima, but using set_plot_option(), to avoid wrong options or wrong values. When that Lisp list was introduced, Andrej Vodopivek complaint that Wxmaxima required a non-empty plot_options variable, so I introduced plot_options (Maxima list) with the minimum content of "[plot_format,gnuplot_pipes]". I don't know if newer versions of Wxmaxima still use plot_options (Maxima list). What I will do is to introduce a reset_plot_options() function and figure out a way to prevent users from changing the Maxima list plot_options. --- **[bugs:#4569] reset(plot_options) doesn't reset plot_options** **Status:** closed **Group:** None **Created:** Tue Jun 17, 2025 02:26 PM UTC by Raymond Toy **Last Updated:** Tue Jun 17, 2025 11:28 PM UTC **Owner:** Raymond Toy Here's an example: ``` (%i1) plot_options; (%o1) [[plot_format, gnuplot_pipes]] (%i2) plot_options:junk; (%o2) junk (%i3) plot_options; (%o3) junk (%i4) reset(plot_options); (%o4) [] (%i5) plot_options; (%o5) junk ``` I think `reset(plot_options)` should reset the value. Maxima doesn't because it's defined using a `defvar` and it's not in the `*variable-initial-values*` hash table. This could be fixed by using `defmvar` to define the variable. --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |