Skip to content

Conversation

@Sadique-The-Alchemist
Copy link
Contributor

can draw a spline curve by using x and y

if the opts contains color attribute it will return an area spline, to give color to the line use edge_color on opts

def spline() do
    x_nx = Nx.linspace(0, 10, n: 100)
    x = Nx.to_list(x_nx)
    y = x_nx |> Nx.sin() |> Nx.to_list()


    Matplotex.spline(x, y, x_label: "X", y_label: "Y", edge_color: "green")
    |> Matplotex.show()
    |> copy()
  end

@Sadique-The-Alchemist Sadique-The-Alchemist merged commit e16c83d into main Jan 3, 2025
1 check passed
@Sadique-The-Alchemist Sadique-The-Alchemist deleted the spline_curve branch January 3, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants