0

I have the next graph. As you notice, there are two graphs in log-log axex. How could I add a tendency line on the purple one (WOR*)?.

The code for this graph is:

axesA2[2].plot(Alm2['mes'],Alm2['WOR'],color='green')
axesA2[2].plot(Alm2['mes'],Alm2['DerivWOR'],color='purple')
axesA2[2].legend();
axesA2[2].set_title('Time vs WOR - WOR*');
axesA2[2].set_xscale('log')
axesA2[2].set_yscale('log')
axesA2[2].set_xlabel("mes");
axesA2[2].set_ylabel("WOR-WOR*");
axesA2[2].grid(True);

enter image description here

By the way, the legend is not showing, but I can handle with that later.

Thanks in advance.

vladimir
  • 21
  • 3
  • 1
    For the legend, you need to put `label=` in the plot commands. E.g. `ax.plot(Alm2['mes'],Alm2['WOR'],color='green', label='green curve')`. The curves that have a `label` will be added when `ax.legend()` is called. – JohanC Apr 04 '22 at 19:33

0 Answers0