Skip to content

Commit

Permalink
feat: Add more festures to full 2D plot example
Browse files Browse the repository at this point in the history
Signed-off-by: Sietze van Buuren <[email protected]>
  • Loading branch information
swvanbuuren committed Aug 20, 2024
1 parent f514ec1 commit 55c54f4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion examples/full.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ def main():
mpg.plot(theta, np.sin(theta + np.pi), style='--', **plot_args)
mpg.plot(theta, np.cos(theta + np.pi), style='.-', **plot_args)
mpg.plot(theta, 0.5*np.cos(theta), color='k', **plot_args)
mpg.gca().grid = True
axis = mpg.gca()
axis.grid = True
axis.xlabel = 'x'
axis.ylabel = 'y'
axis.xticks = ((0.0, '0'),
(np.pi/2.0, 'π/2'),
(np.pi, 'π'),
(1.5*np.pi, '3π/2'),
(2.0*np.pi, '2π'),)
axis.add_legend('y=cos(x)', 'y=sin(x)', 'y=sin(x+π)', 'y=cos(x+π)', 'y=cos(x)/2')


if __name__ == '__main__':
main()

0 comments on commit 55c54f4

Please sign in to comment.