Created
July 16, 2022 03:39
-
-
Save bamattis/7ff2faa50ff5d884edad37350e8667ce to your computer and use it in GitHub Desktop.
Pandas_second_axis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ax = df.plot(x='a', y='b', color='green', style='-o') | |
ax2 = df.plot(x='a', y='c', secondary_y=True,color='blue', style='-o', ax=ax) | |
ax.set_xlabel('X data') | |
ax.set_ylabel('Y1 data', color='green') | |
ax2.set_ylabel('Y2 data', color='blue') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment