Skip to content

Commit

Permalink
updated again withplotParametric
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1998 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Kaj Nyström committed Nov 29, 2005
1 parent 61620f3 commit e2da957
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Compiler/Ceval.rml
Expand Up @@ -1424,8 +1424,8 @@ axiom ceval_interactive_functions (env, Exp.CALL(Absyn.IDENT("clear"),[],_,_),s


(* plotparametric *)

(* The normal case when an array of at least two elements is given as an argument *)
(* This rule represents the normal case when an array of at least two elements
is given as an argument *)
rule Util.list_map(vars,Exp.print_exp_str) => vars' &
list_length(vars') => length &
int_gt(length,1) => true &
Expand Down
3 changes: 2 additions & 1 deletion Compiler/Static.rml
Expand Up @@ -2885,7 +2885,7 @@ relation elab_call_interactive : (Env.Env, Absyn.ComponentRef, Absyn.Exp list,Ab

(* PlotParametric is similar to plot but does not allow a single CREF as an
argument as you are plotting at least one variable as a function of another.
Thus, plotParametric has to take an array as an argument.*)
Thus, plotParametric has to take an array as an argument, or two componentRefs.*)
rule elab_variablenames(vars) => vars'
------------------------------------------------------------------
elab_call_interactive(env, Absyn.CREF_IDENT("plotParametric",_),
Expand All @@ -2898,6 +2898,7 @@ relation elab_call_interactive : (Env.Env, Absyn.ComponentRef, Absyn.Exp list,Ab
Types.PROP((Types.T_BOOL([]),NONE),Types.C_VAR),
SOME(st))


rule elab_exp(env,exp,impl,SOME(st)) => (exp',prop,st')
------------------------------------------------------------------
elab_call_interactive(env, Absyn.CREF_IDENT("timing",_),
Expand Down
6 changes: 6 additions & 0 deletions Compiler/helptext.txt
Expand Up @@ -51,6 +51,12 @@ plot(vars) - Plot variables given as a vector relative to time
the most recently simulated model
Ex: plot({x,y})

plotParametric(vars) - Plot variables given as a vector from
the most recently simulated model,
relative to the first variable given.
Ex: plotParametric({x,y})


readFile(str) - Load file given as string and return a string of the
file content.
Ex: readFile("myModel/myModelr.mo")
Expand Down

0 comments on commit e2da957

Please sign in to comment.