| 1460 | //----------------------------------------------------------------------------- |
| 1461 | |
| 1462 | void DemoCustomStyles() { |
| 1463 | IMGUI_DEMO_MARKER("Custom/Custom Styles"); |
| 1464 | ImPlot3D::PushColormap(ImPlot3DColormap_Deep); |
| 1465 | // normally you wouldn't change the entire style each frame |
| 1466 | ImPlot3DStyle backup = ImPlot3D::GetStyle(); |
| 1467 | MyImPlot3D::StyleSeaborn(); |
| 1468 | if (ImPlot3D::BeginPlot("Seaborn Style")) { |
| 1469 | ImPlot3D::SetupAxes("X-axis", "Y-axis", "Z-axis"); |
| 1470 | ImPlot3D::SetupAxesLimits(-0.5, 9.5, -0.5, 0.5, 0, 10); |
| 1471 | unsigned int xs[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; |
| 1472 | unsigned int ys[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| 1473 | unsigned int lin[10] = {8, 8, 9, 7, 8, 8, 8, 9, 7, 8}; |
| 1474 | unsigned int dot[10] = {7, 6, 6, 7, 8, 5, 6, 5, 8, 7}; |
| 1475 | ImPlot3D::NextColormapColor(); // Skip blue |
| 1476 | ImPlot3D::PlotLine("Line", xs, ys, lin, 10); |
| 1477 | ImPlot3D::NextColormapColor(); // Skip green |
| 1478 | ImPlot3D::PlotScatter("Scatter", xs, ys, dot, 10); |
| 1479 | ImPlot3D::EndPlot(); |
| 1480 | } |
| 1481 | ImPlot3D::GetStyle() = backup; |
| 1482 | ImPlot3D::PopColormap(); |
| 1483 | } |
| 1484 | |
| 1485 | void DemoCustomRendering() { |
| 1486 | IMGUI_DEMO_MARKER("Custom/Custom Rendering"); |
nothing calls this directly
no test coverage detected