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

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

creator

some value

Wikimedia username: Nicoguaro
author name string: Nicoguaro

copyright status

copyrighted

copyright license

Creative Commons Attribution 4.0 International

inception

20 September 2016

source of file

original creation by uploader

software used for creation

Matplotlib

object of statement has role: plotting library
object of statement has role: free and open-source software
object of statement has role: Python package

File history

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

Date/TimeThumbnailDimensionsUserComment
current00:51, 21 September 2016Thumbnail for version as of 00:51, 21 September 2016421 × 428 (87 KB)NicoguaroUser created page with UploadWizard

The following 2 pages use this file:

Global file usage

The following other wikis use this file:

Metadata

No tags for this post.