# Scattermapbox is not defined when testing "Scatter Plots on Mapbox in Python"

**URL:** <https://community.plotly.com/t/scattermapbox-is-not-defined-when-testing-scatter-plots-on-mapbox-in-python/2107>\
**Category:** 📊 Plotly Python\
**Created:** [September 15, 2016, 6:00am UTC](https://community.plotly.com/t/scattermapbox-is-not-defined-when-testing-scatter-plots-on-mapbox-in-python/2107 "2016-09-15T06:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainknight024](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@rainknight024](https://community.plotly.com/u/rainknight024)\
**Post date:** [September 15, 2016, 6:00am UTC](https://community.plotly.com/t/scattermapbox-is-not-defined-when-testing-scatter-plots-on-mapbox-in-python/2107/1 "2016-09-15T06:00:58Z")

</div>

> **[Scatter Plots on Mapbox](https://plot.ly/python/scattermapbox/#new-to-plotly)**
>
> How to make scatter plots on Mapbox maps in Python.

  
In the basic example.  
it shows _Scattermapbox_ is not defined. Please help me on that  
import plotly.plotly as py  
from plotly.graph\_objs import \*

mapbox\_access\_token = ‘pk.eyJ1IjoiY2hlbHNlYXBsb3RseSIsImEiOiJjaXFqeXVzdDkwMHFrZnRtOGtlMGtwcGs4In0.SLidkdBMEap9POJGIe1eGw’

data = Data([  
**_Scattermapbox_** (  
lat=[‘45.5017’],  
lon=[’-73.5673’],  
mode=‘markers’,  
marker=Marker(  
size=14  
),  
text=[‘Montreal’],  
)  
])  
layout = Layout(  
autosize=True,  
hovermode=‘closest’,  
mapbox=dict(  
accesstoken=mapbox\_access\_token,  
bearing=0,  
center=dict(  
lat=45,  
lon=-73  
),  
pitch=0,  
zoom=5  
),  
)

fig = dict(data=data, layout=layout)  
py.iplot(fig, filename=‘Montreal Mapbox’, validate=False)

---

<div class="post-metadata">

**Author:** ![chelsea](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chelsea/32/196_2.png) [@chelsea](https://community.plotly.com/u/chelsea)\
**Post date:** [September 15, 2016, 12:02pm UTC](https://community.plotly.com/t/scattermapbox-is-not-defined-when-testing-scatter-plots-on-mapbox-in-python/2107/2 "2016-09-15T12:02:41Z")

</div>

Hi there,  
This is a new feature, can you upgrade to the latest version of Plotly (`pip install plotly --upgrade`) and let me know if you’re still experiencing this issue.

---

<div class="post-metadata">

**Author:** ![zwang5](https://avatars.discourse-cdn.com/v4/letter/z/b77776/32.png) [@zwang5](https://community.plotly.com/u/zwang5)\
**Post date:** [November 28, 2016, 8:28pm UTC](https://community.plotly.com/t/scattermapbox-is-not-defined-when-testing-scatter-plots-on-mapbox-in-python/2107/3 "2016-11-28T20:28:37Z")

</div>

> [@chelsea](#):
>
> Hi there,  
> This is a new feature, can you upgrade to the latest version of Plotly (pip install plotly --upgrade) and let me know if you’re still experiencing this issue.

Hi, Chelsea. I have the same problem even after I upgraded to the latest version on github. Do you have any idea what might be the problem? Thanks in advance.
