How do I increase the line thickness for sns.lineplot?

As you can see from seaborn.lineplot documentation, the function accepts matplotlib.axes.Axes.plot() arguments, which means you can pass the same arguments you can to matplotlib function in this documentation. If you want to simply adjust the width of your lineplots I find this the easiest: pass an argument linewidth = your_desired_line_width_in_float , for example, linewidth = … Read more

Remove line through legend marker with .plot

You can specify linestyle=”None” or linestyle=”” as a keyword argument in the plot command. Also, ls= can replace linestyle=. import matplotlib.pyplot as plt fig, ax = plt.subplots() for i, (mark, color) in enumerate(zip( [‘s’, ‘o’, ‘D’, ‘v’], [‘r’, ‘g’, ‘b’, ‘purple’])): ax.plot(i+1, i+1, color=color, marker=mark, markerfacecolor=”None”, markeredgecolor=color, linestyle=”None”, label=i) ax.set_xlim(0, 5) ax.set_ylim(0, 5) ax.legend(numpoints=1) plt.show() … Read more

How to place inline labels in a line plot

Update: User cphyc has kindly created a Github repository for the code in this answer (see here), and bundled the code into a package which may be installed using pip install matplotlib-label-lines. Pretty Picture: In matplotlib it’s pretty easy to label contour plots (either automatically or by manually placing labels with mouse clicks). There does … Read more

How to change line width in ggplot?

Whilst @Didzis has the correct answer, I will expand on a few points Aesthetics can be set or mapped within a ggplot call. An aesthetic defined within aes(…) is mapped from the data, and a legend created. An aesthetic may also be set to a single value, by defining it outside aes(). As far as … Read more