Saddle_Point_between_maxima.svg


Summary

Description
English: A saddle point, on the graph of the function
Español: Punto de silla en la función
Date
Source Own work
Author Nicoguaro
SVG development
InfoField
The SVG code is valid .
This plot was created with Matplotlib .
Source code
InfoField

Python code

import numpy as np
from numpy import pi, sin, cos
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
plot_args = {'rstride': 1, 'cstride': 1, 'cmap':"Blues_r",
             'linewidth': 0.4, 'antialiased': True,
             'vmin': -1.5, 'vmax': 1.5}


x, y = np.mgrid[-6:2:31j, -2:6:31j]*pi
z = 0.5*cos(x/2) + sin(y/4)

ax.plot_surface(x, y/2, z, **plot_args)
ax.plot([-2*pi], [pi], [0.5], marker='o', mfc='w', mec='k', mew=1)
ax.view_init(azim=-60, elev=45)
ax.set_xlim(-6*pi, 2*pi)
ax.set_ylim(-pi, 3*pi)
ax.set_zlim(-2, 2)
plt.xticks([-6*pi, -2*pi, 2*pi],
           [r"$-6\pi$", r"$-2\pi$", r"$2\pi$"])
plt.yticks([-pi, pi, 3*pi],
           [r"$-2\pi$", r"$2\pi$", r"$6\pi$"])
ax.set_zticks([-2, 0, 2])
ax.set_zticklabels([r"$-2$", r"$0$", r"$2$"])
ax.w_xaxis.set_pane_color((1.0, 1.0, 1.0, 0.0)) 
ax.w_yaxis.set_pane_color((1.0, 1.0, 1.0, 0.0)) 
ax.w_zaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
ax.set_xlabel(r"$x$", fontsize=18)
ax.set_ylabel(r"$y$", fontsize=18)
ax.set_zlabel(r"$z$", fontsize=18)
plt.savefig("Saddle_Point.svg", bbox_inches="tight", transparent=True)
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

17 May 2016