4

I have a pandas dataframe like this:

NAME POSITION VALUE
A 123 0.1
B 34 0.8

If I create a plot with stripplot, is there a way to have the dots actually be the corresponding values in NAME?

For example, the plot on the tutorial (https://stanford.edu/~mwaskom/software/seaborn/tutorial/categorical.html) shows this plot. Could those dots be replaced with the strings in another column, for example in "NAME"?

enter image description here

2 Answers 2

1

The correct answer is the following (just tested it on my stripplot I am working on)

sns.stripplot(data=yourdata, x=‘column_from_your_data’, size=2’)
0

For future reference, markers can be set to any string by Dollars($).

sns.lineplot(data,marker="$string$")

You should probably also play with markersize to make it prettier.

sns.lineplot(data,marker="$string$", markersize=10)

1
  • The post author asked about stripplot not lineplot, this doesn’t work for stripplot, I just tested it Sep 13, 2022 at 18:36

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.