referencing table data into a plot function? #296
-
Hi all, i wonder if there is a way to reference data from a table into a plot function? The table i made depends on the heigth H and shows for this example bending moment, 2nd order bending moment, required rebar and default rebar per meter heigth. some of these calculations require a lot of code, therefore i would like to " just plot" the values from the table. Is that doable for a variable table size depending on the height? making a switch function for in this case σtrek should be doable, but required rebar depending on heigth H and width D seems a bit tedious to pour into a single function. therefore just having a plot from H and σ would be ideal, but i dont know if thats possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, you can wrap values with take/line/spline functions and plot them. See these examples: https://github.com/Proektsoftbg/Calcpad/blob/main/Examples/Demos/Interpolation.cpd https://github.com/Proektsoftbg/Calcpad/blob/main/Examples/Demos/Interpolation%20of%20Functions.cpd |
Beta Was this translation helpful? Give feedback.
-
Hi, Erik! Do you mean to reference the Html table? Actually, Html is not processed by the Calcpad engine. This is performed afterwards by the browser engine when the output Html is sent to it. The table does not actually exist before that. So it is not possible to do that, unless we make Calcpad to process Html, which is a very heavy task. To use Html to structure Calcpad data is not a good way in general and I do not want to encourage that. It is complicated and error prone. Html is an output/reporting feature. The best way to represent table data in Calcpad will be vectors and matrices, which are going to be ready soon. There will be also an option to read them from CSV files or Excel. |
Beta Was this translation helpful? Give feedback.
Hi, you can wrap values with take/line/spline functions and plot them. See these examples:
https://github.com/Proektsoftbg/Calcpad/blob/main/Examples/Demos/Interpolation.cpd
https://github.com/Proektsoftbg/Calcpad/blob/main/Examples/Demos/Interpolation%20of%20Functions.cpd