0

The following is the code I wrote. I have no idea why the error happened and how to solve it. enter image description here

CHIA YI
  • 107
  • 4

1 Answers1

2

The issue is with your scatter! call. The function expects either an X array and a Y array, or Tuples of (x, y) pairs. Here, assuming you want the point (0.2, 0) to be added to the plot, you can just put an extra pair of parantheses around your values:

scatter!((0.2, 0))

to make it clear that this is an (x, y) pair that you want plotted.

Sundar R
  • 13,776
  • 6
  • 49
  • 76