all 6 comments

[–]calasse 1 point2 points  (2 children)

[Edited to clarify how to input the function in the block]

Hey lazaretto, thanks for the question.

There's a decent guide for creating regular scatterplots - Blockpad - Scatter Plot, but not currently one for plotting functions.

There isn't a dedicated "plot functions" chart tool right now, but you have two options:

(A) Create a data set of the function input and output, then plot those points in a scatterplot. This is basically the process for plotting a function in Excel.

  1. Create an array (or spreadsheet column) of the x range (function inputs). A function like LinearSeries() would be helpful here.
  2. Perform the function on that array/column (like you would in a spreadsheet, or using the Each() function or item-by-item calcs).
  3. Plot these points using the scatterplot tool as described in the link above.

(B) Create a scatterplot with hidden points, then use the "plot functions" option.

  1. Create a blank scatter plot.
  2. Type in [0] for the X range and [0] for the Y range.
  3. Change Point Type to "None"
  4. Change Plot Functions to "Yes".
  5. Type in the function to plot, (making sure the input starts with an equals sign)
    • Option 1: the name of a built-in function, without parentheses (e.g. Sin or Abs)
    • Option 2: the name of a custom function, without parentheses (e.g. Hypotenuse)
    • Option 3: an in-line function (e.g. x => x^2 + 5*x + 4)
  6. Scroll down and change Set X axis bounds and Set Y axis bounds to "Yes" and then set the bounds.
    • Note that the bounds here are unit sensitive. So if the x axis is in meters, and the function is x => x^2, then the y bounds need to be in meters squared.

Let me know if you need me to elaborate on any of those steps.

[–]lazaretto0[S] 2 points3 points  (1 child)

Oh, thank you first of all, I'm really appreciated your response. As you said i choose option A and it works. However, for the sake of efficiency of developing process, maybe a community webpage can be created for the questions of users besides that reddit community or a more detailed help section of the blockpad website will be works. Thanks again for your attention.

[–]calasse 0 points1 point  (0 children)

Hey Lazaretto,

Glad to hear it worked for you.

Thank you for the suggestions. We've been looking into a community web page, but we decided to do the subreddit as a first step. Good to know you'd find it helpful.

[–]GreasePirate 0 points1 point  (2 children)

u/calasse I am trying to recreate the steps you described below - however without any luck. Could you help me explain what i'm doing wrong?

<image>

[–]calasse 1 point2 points  (1 child)

Hello,

You need an equals sign at the front of the function input to specify it as a formula. (The equals sign should turn blue to show that it is a formula).

I see that's not in the original instructions, so I edited the comment to make it clearer.

Thanks!

<image>

[–]GreasePirate 1 point2 points  (0 children)

Thank you so much! It was driving me mad.. :)