# Debugging fitting data and empty plot

**URL:** <https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518>\
**Category:** Questions\
**Tags:** data-science, graphics-and-visualization, optimization, numerical-computation\
**Created:** [May 23, 2025, 9:21am UTC](https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518 "2025-05-23T09:21:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chamurba04](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@chamurba04](https://community.wolfram.com/u/chamurba04)\
**Post date:** [May 23, 2025, 9:21am UTC](https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518/1 "2025-05-23T09:21:50Z")

</div>

My code is not executing the fitting command and return an empty plot. Appreciate any pointers. Thanks

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/270184d0-5ba5-4e8b-84a6-9603ebb9e5e4)

◔

◔

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [May 23, 2025, 9:51am UTC](https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518/2 "2025-05-23T09:51:55Z")

</div>

You are using the syntax of `FindMinimum` in `NMinimize`.

`NMinimize` does not use starting points.

---

<div class="post-metadata">

**Author:** ![chamurba04](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@chamurba04](https://community.wolfram.com/u/chamurba04)\
**Post date:** [May 23, 2025, 11:54am UTC](https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518/3 "2025-05-23T11:54:27Z")

</div>

Here is a simple code that uses “starting points” NMinimize[{x^2 + (y - .5)^2, y \>= 0 && y \>= x + 1}, {x, y}]

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [May 23, 2025, 12:52pm UTC](https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518/4 "2025-05-23T12:52:19Z")

</div>

Starting points are entered like this:

```
NMinimize[{x^2 + (y - .5)^2, y >= 0 && y >= x + 1}, {{x, stargingPointX},{y,startingPointY}}]

```

---

<div class="post-metadata">

**Author:** ![mroge02](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mroge02/32/28775_2.png) [@mroge02](https://community.wolfram.com/u/mroge02)\
**Post date:** [May 23, 2025, 3:11pm UTC](https://community.wolfram.com/t/debugging-fitting-data-and-empty-plot/25518/5 "2025-05-23T15:11:03Z")

</div>

Below shows a simple example of how to specify “starting points” in `NMinimize[]`. The methods used by `NMinimize[]` usually need several starting points, at least `n+1`, where `n` is the number of variables.

```
NMinimize[{x^2 + (y - .5)^2, y >= 0 && y >= x + 1}, {x, y}, 
 Method -> {Automatic, "InitialPoints" -> {{0, 1}, {0, 4}, {2, 4}}}]

```

I believe `NMinimize[]` will add extra points if needed. A specific method instead of `Automatic` may be used.
