File:Himmelblau contour.svg

Original file(SVG file, nominally 421 × 428 pixels, file size: 87 KB)

Commons-logo.svg This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.

Summary

Description
English: Log-spaced down contour plot of Himmelblau's function.
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

"""
Contour plot of the Himmelblau function.
"""
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams

rcParams['font.size'] = 12

npts = 201
x, y = np.mgrid[-6:6:npts*1j, -6:6:npts*1j]
z = (x**2 + y - 11)**2 + (x + y**2 - 7)**2

fig = plt.figure(figsize=(5, 5))
levels = np.logspace(0.3, 3.5, 15)
plt.contour(x, y, z, levels, cmap="viridis")
plt.xlabel(r"$x$", fontsize=14)
plt.ylabel(r"$y$", fontsize=14)
plt.xticks([-6, -3, 0, 3, 6])
plt.yticks([-6, -3, 0, 3, 6])
plt.xlim([-6, 6])
plt.ylim([-6, 6])
plt.savefig("Himmelblau_contour.svg", bbox_inches="tight")
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

20 September 2016

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current17:51, 20 September 2016421 × 428 (87 KB)NicoguaroUser created page with UploadWizard

The following page uses this file:

Metadata