0

I want to make subplots in matplotlib and set up different properties: but I have an error 'AxesSubplot' object has no attribute 'setp'

fig, ax = plt.subplots()

ax.axvline(x=654.31, linewidth=4, ls = '--', color = 'Gold' )

(markers, stemlines, baseline) = ax.stem(dfs.index, dfs.RTCM)
ax.setp(stemlines, linestyle="-", color="olive", linewidth=0.5 )

I can not find the way i can solve it. I will appreciate any help.

1
  • That error needs to be taken literally: The command simply does not exist. It's plt.setp instead. Commented Oct 18, 2019 at 14:14

1 Answer 1

1

You can set the line format and color directly in the stem function

ax.stem(dfs.index, dfs.RTCM, linefmt='C4-', markerfmt='D')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.