# GMTInvalidInput: Unrecognized parameter 'sizes'

**URL:** <https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106>\
**Category:** PyGMT Q&A\
**Created:** [July 10, 2022, 5:38pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106 "2022-07-10T17:38:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrebelem](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/andrebelem/32/1218_2.png) [@andrebelem](https://forum.generic-mapping-tools.org/u/andrebelem)\
**Post date:** [July 10, 2022, 5:38pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/1 "2022-07-10T17:38:24Z")

</div>

Hello folks,  
in a very simples command using plot3D, this error is arising:

```auto
    fig.plot3d(x=500000,y=7700000,z=-track.bot[0],
               sizes=(track.top[0]-track.bot[0]),
               region=region+[-3500,0],
               perspective=[135,30],
               projection='X12c',
               style='u0.3c',
               color='red',
               zsize='5c'
              )

```

GMTInvalidInput: Unrecognized parameter ‘sizes’.

With “sizes” (and according to several tutorials) I should be able to control the size of the cube, however… strange that what appears is as if this option is invalid.

I just ran the tutorial from [https://www.pygmt.org/v0.2.1/gallery/plot/scatter3d.html#sphx-glr-gallery-plot-scatter3d-py](https://www.pygmt.org/v0.2.1/gallery/plot/scatter3d.html#sphx-glr-gallery-plot-scatter3d-py) and got the same problem.

Any idea ?

---

<div class="post-metadata">

**Author:** ![andrebelem](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/andrebelem/32/1218_2.png) [@andrebelem](https://forum.generic-mapping-tools.org/u/andrebelem)\
**Post date:** [July 10, 2022, 5:39pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/2 "2022-07-10T17:39:29Z")

</div>

ops ! just saw it changed to “size” in the latest version 🙂  
However the problem changed to

TypeError: len() of unsized object

---

<div class="post-metadata">

**Author:** ![EJFielding](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ejfielding/32/82_2.png) [@EJFielding](https://forum.generic-mapping-tools.org/u/EJFielding)\
**Post date:** [July 10, 2022, 6:02pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/3 "2022-07-10T18:02:02Z")

</div>

You should look at a more recent version of the Gallery. It is up to v 0.7 now:

> **[3D Scatter plots — PyGMT](https://www.pygmt.org/v0.7.0/gallery/3d_plots/scatter3d.html#sphx-glr-gallery-3d-plots-scatter3d-py)**

I am not a Python expert, but `region=region+[-3500,0],` does not look like good Python usage to me.

---

<div class="post-metadata">

**Author:** ![andrebelem](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/andrebelem/32/1218_2.png) [@andrebelem](https://forum.generic-mapping-tools.org/u/andrebelem)\
**Post date:** [July 10, 2022, 6:04pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/4 "2022-07-10T18:04:26Z")

</div>

“region+[-3500,0]” works fine. It’s not the problem.  
I just realized any dimension in “size” must be part of the region (humm).

---

<div class="post-metadata">

**Author:** ![EJFielding](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ejfielding/32/82_2.png) [@EJFielding](https://forum.generic-mapping-tools.org/u/EJFielding)\
**Post date:** [July 10, 2022, 6:08pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/5 "2022-07-10T18:08:54Z")

</div>

From the v0.7 version of the manual:  
`size (1d array) – The size of the data points in units specified in style. Only valid if using x/y/z.`

I think you need to make it an array, even if it has only one value by adding `[]` around it.

---

<div class="post-metadata">

**Author:** ![andrebelem](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/andrebelem/32/1218_2.png) [@andrebelem](https://forum.generic-mapping-tools.org/u/andrebelem)\
**Post date:** [July 10, 2022, 6:33pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/6 "2022-07-10T18:33:08Z")

</div>

I can assure you that I don’t need to. When I remove plot3d from the script it works perfectly with the region delimiting by “region+[-3500,0]”. This is 100% python.

I tested the plot3d here and the len() issue is because the “size” is related to the “zscale” (conflicting with zsize) and how the “style” is defined (which cannot have fixed the size of the symbols).

So…I’m working around this. But thanks for your suggestions.

---

<div class="post-metadata">

**Author:** ![andrebelem](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/andrebelem/32/1218_2.png) [@andrebelem](https://forum.generic-mapping-tools.org/u/andrebelem)\
**Post date:** [July 11, 2022, 4:40pm UTC](https://forum.generic-mapping-tools.org/t/gmtinvalidinput-unrecognized-parameter-sizes/3106/7 "2022-07-11T16:40:29Z")

</div>

The solution was to use `text` but still in 3D (not a 2D plain text over 3D figure). But thanks to @maxrjones for the idea. By now, I’m using am overlaying basemap and write the labels in 2D.
