Skip to content
Snippets Groups Projects
Commit bacbb4f7 authored by soblin's avatar soblin
Browse files

fixed some TOODs

parent bfad1c16
No related branches found
No related tags found
No related merge requests found
// example https://matplotlib.org/stable/gallery/mplot3d/contour3d.html
#include <matplotlibcpp17/pyplot.h>
#include <matplotlibcpp17/cm.h>
#include <xtensor/xbuilder.hpp>
#include <xtensor/xmath.hpp>
......@@ -49,8 +50,7 @@ int main() {
auto fig = plt.figure();
auto ax = fig.add_subplot(Args(), Kwargs("projection"_a = "3d"));
auto [X, Y, Z] = get_test_data(0.05);
// TODO: cmap=cm.coolwarm
ax.contour(Args(X, Y, Z));
ax.contour(Args(X, Y, Z), Kwargs("cmap"_a = cm::coolwarm()));
#if USE_GUI
plt.show();
#else
......
......@@ -45,6 +45,10 @@ int main() {
"linewidth"_a = 0, "antialiased"_a = false,
"cmap"_a = cm::coolwarm()));
ax.set_zlim(Args(-1.01, 1.01));
// TODO
// auto locator = ticker::LinearLocator(Args(10));
// ax.zaxis.set_major_locator(Args(locator.unwrap()));
// ax.zaxis.set_major_formatter(Args("{x:.02f}"));
fig.colorbar(Args(surf), Kwargs("shrink"_a = 0.5, "aspect"_a = 5));
plt.show();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment