summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-07-23 19:46:04 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-07-23 19:46:04 +0200
commitc73351bc5e590d5a7ebd2b0f13f895a447d25794 (patch)
tree4e2028329e2c0b63a7818463918397de328d6432 /metapost
parented85eb918354b77672bbe347c2afcfe2e0b6b7fb (diff)
downloadcontext-c73351bc5e590d5a7ebd2b0f13f895a447d25794.tar.gz
2021-07-23 18:53:00
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mpxl/mp-lmtx.mpxl3
-rw-r--r--metapost/context/base/mpxl/mp-luas.mpxl4
2 files changed, 6 insertions, 1 deletions
diff --git a/metapost/context/base/mpxl/mp-lmtx.mpxl b/metapost/context/base/mpxl/mp-lmtx.mpxl
index f06bb6991..9984ab805 100644
--- a/metapost/context/base/mpxl/mp-lmtx.mpxl
+++ b/metapost/context/base/mpxl/mp-lmtx.mpxl
@@ -1070,6 +1070,9 @@ def lmt_do_chart_start (expr what) =
save width, height, distance, linewidth, labelgap, labelfraction, value, nofsamples, nofsamplesets ;
save fillcolor, drawcolor, labelcolor, labelstyle, labelformat, labelstrut, labelanchor, colormode ;
string fillcolor, drawcolor, labelcolor, labelstyle, labelformat, labelstrut, labelanchor, colormode ;
+ if hasparameter "sampleset" :
+ setluaparameter "what" "samples" (getparameter "sampleset") ;
+ fi ;
height := getparameter "height" ;
width := getparameter "width" ;
distance := getparameter "distance" ;
diff --git a/metapost/context/base/mpxl/mp-luas.mpxl b/metapost/context/base/mpxl/mp-luas.mpxl
index 04526c061..00e7876a8 100644
--- a/metapost/context/base/mpxl/mp-luas.mpxl
+++ b/metapost/context/base/mpxl/mp-luas.mpxl
@@ -260,6 +260,7 @@ newscriptindex mfid_getparametertext ; mfid_getparametertext := scriptin
newscriptindex mfid_applyparameters ; mfid_applyparameters := scriptindex "applyparameters" ;
newscriptindex mfid_pushparameters ; mfid_pushparameters := scriptindex "pushparameters" ;
newscriptindex mfid_popparameters ; mfid_popparameters := scriptindex "popparameters" ;
+newscriptindex mfid_setluaparameter ; mfid_setluaparameter := scriptindex "setluaparameter" ;
def getparameters = runscript mfid_getparameters enddef ;
def presetparameters = runscript mfid_presetparameters enddef ;
@@ -276,10 +277,11 @@ def getparametertext = runscript mfid_getparametertext enddef ;
def applyparameters = runscript mfid_applyparameters enddef ;
def pushparameters = runscript mfid_pushparameters enddef ;
def popparameters = runscript mfid_popparameters enddef ;
+def setluaparameter = runscript mfid_setluaparameter enddef ;
permanent getparameters, presetparameters, hasparameter, hasoption, getparameter, getparameterdefault,
getparametercount, getmaxparametercount, getparameterpath, getparameterpen, getparametertext, % getparameteroption,
- applyparameters, pushparameters, popparameters ;
+ applyparameters, pushparameters, popparameters, setluaparameter ;
newscriptindex mfun_newrecord ; mfun_newrecord := scriptindex "newrecord" ;
newscriptindex mfun_setrecord ; mfun_setrecord := scriptindex "setrecord" ;