# Size of marker by condition plotly graph (go)

**URL:** <https://community.plotly.com/t/size-of-marker-by-condition-plotly-graph-go/56055>\
**Category:** 📊 Plotly Python\
**Created:** [August 30, 2021, 1:22pm UTC](https://community.plotly.com/t/size-of-marker-by-condition-plotly-graph-go/56055 "2021-08-30T13:22:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HermanJson](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@HermanJson](https://community.plotly.com/u/HermanJson)\
**Post date:** [August 30, 2021, 1:22pm UTC](https://community.plotly.com/t/size-of-marker-by-condition-plotly-graph-go/56055/1 "2021-08-30T13:22:42Z")

</div>

Hi here  
i was able to do something like that:

```auto
go.Scatter(x=df['tim'],y=df['number'],mode="markers",marker=dict(color=(df.test=='P').astype('int),
                colorscale=[[0,'red'][1,'red']]),
                size=6
)

```

to change the color of the the markers depending on test (if P or F)  
Is there a way to do the same thing with size? like size = 6 if df.test==‘p’ else 15?

thank you in advance
