Example using a Pandas dataframe with the following columns:
- longitude
- latitude
- population
- median house value
```python
df.plot(kind="scatter", x="longitude", y="latitude", grid=True,
s=df["population"] / 100, label="population",
c="median_house_value", cmap="jet", colorbar=True,
legend=True, sharex=False, figsize=(10, 7)
)
```
![[4D Scatterplot.png]]