Permalink
Browse files

Some graphing and images.

  • Loading branch information...
ubershmekel committed Apr 28, 2012
1 parent 5a6422d commit bf37cda22bc159ce163aebb10451b732674a5780
View
@@ -1,4 +1,5 @@
-absolute_ratio
+abs_ratio
==============
-Absolute Ratio
+Absolute Ratio
+
View
@@ -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()
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.

0 comments on commit bf37cda

Please sign in to comment.