Skip to content

Commit

Permalink
Some graphing and images.
Browse files Browse the repository at this point in the history
  • Loading branch information
ubershmekel committed Apr 28, 2012
1 parent 5a6422d commit bf37cda
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
@@ -1,4 +1,5 @@
absolute_ratio
abs_ratio
==============

Absolute Ratio
Absolute Ratio

36 changes: 36 additions & 0 deletions graph_it.py
@@ -0,0 +1,36 @@
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

# This example demonstrates mplot3d's offset text display.
# As one rotates the 3D figure, the offsets should remain oriented
# same way as the axis label, and should also be located "away"
# from the center of the plot.
#
# This demo triggers the display of the offset text for the x and
# y axis by adding 1e5 to X and Y. Anything less would not
# automatically trigger it.

fig = plt.figure()
#fig.patch.set_facecolor('white')
#ax = fig.gca(projection='3d')
ax = fig.add_subplot(111, projection='3d')
X, Y = np.mgrid[0.2:2:0.02, 0.2:2:0.02]
#Z = np.sqrt(np.abs(np.cos(X) + np.cos(Y)))
def MyZ(X, Y):
#Z = X[::]
Z = (Y > X) * (Y / X) + (X >= Y) * (X / Y)
#Z[(Z == np.nan)] = 0
#Z[(Z == np.inf)] = 0
return Z

Z = MyZ(X, Y)
#surf = ax.plot_surface(X, Y, Z, cstride=1, rstride=1)
surf = ax.plot_surface(X, Y, Z, linewidth=0, cstride=1, rstride=1, cmap=cm.jet)
ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_zlabel("abs_ratio")
ax.set_zlim(0, 10)

plt.show()
Binary file added images/abs equation.docx
Binary file not shown.
Binary file added images/abs_ratio_a_b.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/abs_ratio_a_b_definition.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/abs_ratio_a_b_definition_plus_id.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/abs_ratio_a_b_front.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/absolute-ratio-2.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/absolute-ratio-graph.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/absolute-ratio-graph2.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/absolute-ratio.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bf37cda

Please sign in to comment.