# How to change size of point in px.strip plot

**URL:** <https://community.plotly.com/t/how-to-change-size-of-point-in-px-strip-plot/70506>\
**Category:** 📊 Plotly Python\
**Tags:** question\
**Created:** [December 3, 2022, 9:27pm UTC](https://community.plotly.com/t/how-to-change-size-of-point-in-px-strip-plot/70506 "2022-12-03T21:27:44Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [December 6, 2022, 10:40pm UTC](https://community.plotly.com/t/how-to-change-size-of-point-in-px-strip-plot/70506/5 "2022-12-06T22:40:10Z")

</div>

Hi @yogi_dhiman,

I admit, I got a bit carried away by your question and came up with a scatter strip plot 😂

What gets lost in this process, is the separation of the data points for a given y-coordinate (in this case the weekday) which is created by `px.strip`

```python
import plotly.express as px
import plotly.graph_objects as go

# create data
df = px.data.tips()

# calculate relative tip
df['rel_tip'] = df.tip / df.total_bill *100
df.rel_tip = df.rel_tip.apply(round,0)

# set the marker size
# all relative tips above 25% --> 30
# all relative tips above 20% to 25% --> 20
# rest --> 10
size=[]
for tip, gender in zip(df.rel_tip, df.sex):
    if tip>25:
        size.append(30)
    elif 20<tip<=25:
        size.append(20)
    else:
        size.append(10)

# set marker color, female=gold, male=crimson
color=[['crimson', 'gold'][gender == 'Female'] for gender in df.sex]

# create plotly.graph_objects Figure() and add trace
figure = go.Figure()
figure.add_scatter(
    x=df.total_bill,
    y=df.day,
    mode='markers',
    marker={'size': size, 'color': color}
    )
figure.update_layout(template='plotly_dark')
figure.show()

```

creates:

 ![newplot (26)](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/f/6/f6da8a9ec93e32b4198468e40b2d4cdb215994fc.png)

---

_[View the full topic](https://community.plotly.com/t/how-to-change-size-of-point-in-px-strip-plot/70506)._
