| 2579 | //----------------------------------------------------------------------------- |
| 2580 | |
| 2581 | void Demo_CustomStyles() { |
| 2582 | IMGUI_DEMO_MARKER("Custom/Custom Styles"); |
| 2583 | ImPlot::PushColormap(ImPlotColormap_Deep); |
| 2584 | // normally you wouldn't change the entire style each frame |
| 2585 | ImPlotStyle backup = ImPlot::GetStyle(); |
| 2586 | MyImPlot::StyleSeaborn(); |
| 2587 | if (ImPlot::BeginPlot("seaborn style")) { |
| 2588 | ImPlot::SetupAxes( "x-axis", "y-axis"); |
| 2589 | ImPlot::SetupAxesLimits(-0.5f, 9.5f, 0, 10); |
| 2590 | unsigned int lin[10] = {8,8,9,7,8,8,8,9,7,8}; |
| 2591 | unsigned int bar[10] = {1,2,5,3,4,1,2,5,3,4}; |
| 2592 | unsigned int dot[10] = {7,6,6,7,8,5,6,5,8,7}; |
| 2593 | ImPlot::PlotBars("Bars", bar, 10, 0.5f); |
| 2594 | ImPlot::PlotLine("Line", lin, 10); |
| 2595 | ImPlot::NextColormapColor(); // skip green |
| 2596 | ImPlot::PlotScatter("Scatter", dot, 10); |
| 2597 | ImPlot::EndPlot(); |
| 2598 | } |
| 2599 | ImPlot::GetStyle() = backup; |
| 2600 | ImPlot::PopColormap(); |
| 2601 | } |
| 2602 | |
| 2603 | //----------------------------------------------------------------------------- |
| 2604 |
nothing calls this directly
no test coverage detected