mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
tabs -> whitespace
This commit is contained in:
parent
d70c6cf377
commit
47eddbfc80
@ -52,9 +52,9 @@ This code snippet results in a plot like this:
|
||||
As shown in [Plotting Mathematical Functions as Line Graphs](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot) you can also use externally set parameters in a plot function. These parameters can be double numbers and may be set with either as an internal parameter vector, or may be read from a parameter column (as shown in the [linked example](https://github.com/jkriege2/JKQtPlotter/tree/master/test/simpletest_functionplot)). These parameters are available as variables `p1`, `p2`, ... in the function string. Here is a small example:
|
||||
|
||||
```c++
|
||||
JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot);
|
||||
JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot);
|
||||
parsedFunc->set_function("sin(x*p1)*exp(-x/p2)");
|
||||
parsedFunc->set_paramV(/*p1=*/8, /*p2=*/4);
|
||||
parsedFunc->set_paramV(/*p1=*/8, /*p2=*/4);
|
||||
parsedFunc->set_title("user function");
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user