wxMaxima-developers / wxmaxima

A gui for the computer algebra system Maxima built with wxWidgets
https://wxMaxima-developers.github.io/wxmaxima/
Other
460 stars 96 forks source link

user_preamble not passed to gnuplot when using user_preamble="set term windows at the end of a draw2d( xx ) #1851

Open ReneSci opened 7 months ago

ReneSci commented 7 months ago

The settings set in a user_preamble statement

user_preamble  = ["set xtics out", "set mxtics 10", "set ytics out", "set font 'Areal, 8 '", "set zero 10^-100", 
    "set format y '%0.3se%03S'", "unset clip",  "set autoscale y" /*,  "set autoscale y2" */ ],

is not passed to gnuplot when the user_preamble="set term windows" statement is used to get the "old" gnuplot therminal containing the gnu-command therminal:

(%o1)   build_info(version="branch_5_47_base_452_g182b5c1ce",timestamp="2023-11-08 23:52:47",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="2.3.2",maxima_userdir="C:/Users/xxx/maxima",maxima_tempdir="C:/Users/xxx/AppData/Local/Temp",maxima_objdir="C:/Users/xx/maxima/binary/branch_5_47_base_452_g182b5c1ce/sbcl/2_3_2",maxima_frontend="wxMaxima",maxima_frontend_version="23.10.0_DevelopmentSnapshot_MSW")

Also: the mean to obtain greek letters in axix labels is also different wether I use user_preamble="set term windows" or not


(%i1132)    set_draw_defaults(
    dimensions    = [1500, 800],
    user_preamble  = ["set xtics out", "set mxtics 10", "set ytics out", "set font 'Areal, 8 '", "set zero 10^-100", 
    "set format y '%0.3se%03S'", "unset clip",  "set autoscale y" /*,  "set autoscale y2" */ ],

     /* yrange = [-10, 100] , */
          yrange_secondary =  [0.00, 30],
     xtics  = LOGDataXtics[2],
     xtics_rotate = true,
     font           = "Sans",
        font_size      = 12,
    title          = "Measurements",
        xlabel         = "Time",
    ylabel         = "Temperature [°C]",
    ylabel_secondary = " Data",
     grid           = true,
          palette        = gray,
      point_type    = 0,
     point_size    = 1,
    points_joined = true)$

draw2d(
    color = blue,  
    key = concat( SSTDataFile[1], " : ", LOGDataHeader[1][5][2]),
    points(LOGDataTimeDateIteger[1],  LOGDataMatrix[1][5] ), 
    user_preamble="set term windows")
ReneSci commented 7 months ago

If I put "set term windows" into the first user_preamble statement it seems to pass all the settings.

Greek letters are different though

user_preamble  = ["set xtics out", "set mxtics 10", "set ytics out", "set font 'Areal, 8 '", "set zero 10^-100", 
"set format y '%0.3se%03S'", "unset clip",  "set autoscale y",  "set autoscale y2"  , "set term windows" ],