I need to produce a plot in which a line is plotted in Pigment Blue (hex= #333399
) and with the o
marker.
I know I can plot the line in Blue with the o
marker by just calling:
line1 = ax1.plot(x, myvalues,'bo-', label='My Blue values')
Question: how should the line be changed if I wanted to still keep the marker and change the color from b
to #333399
?
You can change lots of things if you use the kwargs to plot
(which get passed to Line2D
) instead of the shorthand 'bo-'. For example:
line1 = ax1.plot(
x, myvalues,
marker = 'o',
linestyle = '-',
markerfacecolor='#333399',
markeredgecolor='k',
label='My Blue values')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With