mirror of
https://github.com/gwm17/implot.git
synced 2025-04-22 00:18:49 -04:00
Compare commits
499 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
18758e237e | ||
|
fb084f3719 | ||
|
33c5a965f5 | ||
|
d875123534 | ||
|
fcb51d2c9c | ||
|
626e391670 | ||
|
8879c99aef | ||
|
6978a3e177 | ||
|
15e494b76a | ||
|
f88ad32a47 | ||
|
3e13c95986 | ||
|
4ba42f200a | ||
|
57149164d5 | ||
|
9ef3a97966 | ||
|
921a81f307 | ||
|
8c06ff0252 | ||
|
98c76edbb4 | ||
|
f719a180ff | ||
|
49db527db1 | ||
|
fd16fe001c | ||
|
002ffc95bc | ||
|
e80e42e8b4 | ||
|
220f5c9ab4 | ||
|
7a470b2e17 | ||
|
f33a5990d7 | ||
|
1fed5c2c19 | ||
|
b4aec718a5 | ||
|
8c53333489 | ||
|
fc0fd11246 | ||
|
6c00109636 | ||
|
0f4d4dccc3 | ||
|
6f4986b14f | ||
|
dbb461db24 | ||
|
63d5ed94b7 | ||
|
79b05d5e25 | ||
|
b9c0a39b08 | ||
|
3dd7e75c7d | ||
|
947c2c02e4 | ||
|
32a4617cd6 | ||
|
196a0243c5 | ||
|
df4256c9e8 | ||
|
1160243218 | ||
|
b47c8bacdb | ||
|
58240e5311 | ||
|
9b4ba149ec | ||
|
f438a21813 | ||
|
86f4dd6e5c | ||
|
adfc96810e | ||
|
8d3bd31395 | ||
|
168244e422 | ||
|
3a53f0b796 | ||
|
199b4803b6 | ||
|
6659b164fe | ||
|
4fcc6e01ac | ||
|
c0da6fea04 | ||
|
6ee1559715 | ||
|
dea3387cdc | ||
|
c40206f2ea | ||
|
f1b86b9fe4 | ||
|
5ed9e78676 | ||
|
14d4c96d0c | ||
|
0fb3346a7a | ||
|
3e96fd7c02 | ||
|
c8601ac0d5 | ||
|
864ebb90b6 | ||
|
4be83def59 | ||
|
507459fd5f | ||
|
2dc2a4cfd5 | ||
|
83cb14b54a | ||
|
cd4704fd52 | ||
|
bffd448207 | ||
|
51930a5ae6 | ||
|
5ab78cbc7d | ||
|
eb40cc908d | ||
|
389781c31c | ||
|
8c1bbf4d8d | ||
|
65aa2c8264 | ||
|
ab24f756fa | ||
|
e9469cf347 | ||
|
0cafcd0011 | ||
|
3109940b46 | ||
|
4edb1c75b6 | ||
|
da1bf57136 | ||
|
e966e0d2bc | ||
|
450e5b80df | ||
|
dd78125bfb | ||
|
555ff688a8 | ||
|
04ae3728f8 | ||
|
27bc59eb43 | ||
|
1d674e7557 | ||
|
41a0e2c9fe | ||
|
707a0bee36 | ||
|
ed1baf471a | ||
|
4b0f9c9495 | ||
|
ab110ceec8 | ||
|
e5c457b326 | ||
|
ef6c55cd00 | ||
|
5db2ba3b22 | ||
|
7aab224742 | ||
|
db6b0356ee | ||
|
ccd29a646f | ||
|
95a530f05c | ||
|
eff70aeee0 | ||
|
eea12d6b4c | ||
|
1d9381a004 | ||
|
b85a2c0800 | ||
|
46ea9abab4 | ||
|
607703d2af | ||
|
b958abf459 | ||
|
dd2d9ce032 | ||
|
67e0876f89 | ||
|
7234801868 | ||
|
413fb083ad | ||
|
e64df657b2 | ||
|
6e2499093b | ||
|
c73509d6d1 | ||
|
798e2e7585 | ||
|
6f7bf5f38b | ||
|
5fd1ecdfd7 | ||
|
a6bab98517 | ||
|
5b59b47bae | ||
|
a9d3347915 | ||
|
fa10618df6 | ||
|
b22c21f912 | ||
|
9b5adca5f1 | ||
|
4af202a988 | ||
|
9974ce1a30 | ||
|
10a58c52ca | ||
|
b369d62f86 | ||
|
fa10a03a53 | ||
|
24b543839b | ||
|
95eb2ea78d | ||
|
af7d99cbca | ||
|
40cbe88673 | ||
|
48c0d6fe38 | ||
|
ad29c9a046 | ||
|
c942a400e4 | ||
|
862b8c44ea | ||
|
f506f94c08 | ||
|
adbec89ae9 | ||
|
96e0fd9c57 | ||
|
638ae7d5f7 | ||
|
eb935d0b4f | ||
|
42d93bcdbc | ||
|
587c8b6221 | ||
|
f9a15a7147 | ||
|
ce6d720828 | ||
|
394516cedb | ||
|
92bc4d64e3 | ||
|
b5cf8b8431 | ||
|
8a3ccf0a44 | ||
|
da5b4ab8d3 | ||
|
90cbb561f0 | ||
|
28fedd01f9 | ||
|
93bab1930e | ||
|
019de727ba | ||
|
1911116b3b | ||
|
13e430a9e5 | ||
|
a7ae1bca53 | ||
|
9c4ef16696 | ||
|
bbbf4e2a42 | ||
|
297c69dae8 | ||
|
0e9ceb6bc0 | ||
|
4ed7d01637 | ||
|
c6aff1362c | ||
|
0ed6307d0b | ||
|
927c9c82a5 | ||
|
45e3433a1a | ||
|
fd746c3776 | ||
|
9e927df91e | ||
|
ec8e87561f | ||
|
13927c608d | ||
|
39328e1106 | ||
|
2ac10e73b0 | ||
|
04cc84ece0 | ||
|
f348c15fde | ||
|
eff5cee895 | ||
|
bb844612eb | ||
|
117816d4e1 | ||
|
5e0e60b969 | ||
|
4f0a09f14d | ||
|
fbfd41047b | ||
|
04dc2c6be9 | ||
|
3cdf7add04 | ||
|
9f1b0f195c | ||
|
729bd762cc | ||
|
0154c02a37 | ||
|
c0409ff4ff | ||
|
700a7bab56 | ||
|
75e779c931 | ||
|
48cc6e15d6 | ||
|
3206209777 | ||
|
8fdeacac54 | ||
|
2eeceb3e22 | ||
|
5c550385c6 | ||
|
5c3d64cd9e | ||
|
930c4b2eb4 | ||
|
902cf44234 | ||
|
d8610c33c7 | ||
|
2b46c3eac3 | ||
|
d14dd621e4 | ||
|
5ea558cf51 | ||
|
041d88a520 | ||
|
06629f5675 | ||
|
c87c34d7c3 | ||
|
a09cca5329 | ||
|
508502a38f | ||
|
60b080941a | ||
|
899f19ab08 | ||
|
94b22ee584 | ||
|
5f1818ac05 | ||
|
99ed32233e | ||
|
efc72d9c34 | ||
|
2206af8c1e | ||
|
42d267f7f4 | ||
|
901f0558b1 | ||
|
d23bd30a44 | ||
|
6f3f43c815 | ||
|
be6e1c2d2e | ||
|
2dcdfc519a | ||
|
defc529219 | ||
|
d3ea373cc7 | ||
|
f92625a462 | ||
|
61e6b5118e | ||
|
e0450d00af | ||
|
fe552f25f0 | ||
|
c70eee5701 | ||
|
8d74440765 | ||
|
0c76ffe81e | ||
|
fc1962cdef | ||
|
e5f1cf4bdf | ||
|
5f77a9bb58 | ||
|
90693cca1b | ||
|
071503b43a | ||
|
70f56d8a40 | ||
|
bb2ff2aea7 | ||
|
0877aca4f9 | ||
|
0fa1fb982a | ||
|
c8b21a6d36 | ||
|
624fedabe4 | ||
|
9d9b145548 | ||
|
4a584bad40 | ||
|
b74accfb59 | ||
|
9e82be5bff | ||
|
8cbbfc241f | ||
|
fb19e76443 | ||
|
fa2c704bb2 | ||
|
9bc5b55766 | ||
|
71bf19b4c4 | ||
|
e783825e4b | ||
|
92f787944c | ||
|
3e21d841a2 | ||
|
dfc77f2ba4 | ||
|
fce58ee075 | ||
|
02e3226e51 | ||
|
ae568a3260 | ||
|
b198a8b2bc | ||
|
fc3658e420 | ||
|
13c8f97215 | ||
|
b84e74b885 | ||
|
2880ae8414 | ||
|
cac7a61235 | ||
|
0111edcd76 | ||
|
acb69ab410 | ||
|
2f139f8a99 | ||
|
30ffe79d1d | ||
|
044ac47f51 | ||
|
8eb6bba63b | ||
|
9f851e700b | ||
|
1b4a2049a7 | ||
|
b2db7d11ec | ||
|
5cc168dbf0 | ||
|
1884d3d7d5 | ||
|
db16011e73 | ||
|
9b8270d939 | ||
|
63e2ce3ddd | ||
|
0fd704b2a6 | ||
|
eff8b5be43 | ||
|
5039315122 | ||
|
9b85a2ef6e | ||
|
0afa53059e | ||
|
a8e7194f2b | ||
|
9deca4e422 | ||
|
a41d413790 | ||
|
7da6ed69f3 | ||
|
ff29f1ebcc | ||
|
8c125ccd6b | ||
|
c1daaab8ea | ||
|
59aa912e73 | ||
|
ac07bea9ac | ||
|
36a86cf955 | ||
|
038a9c9282 | ||
|
b409aecd30 | ||
|
53c867f414 | ||
|
0926677b52 | ||
|
017a273862 | ||
|
642bc97a6e | ||
|
2df34aea12 | ||
|
47a76851ee | ||
|
7763b9cf43 | ||
|
2bc716d2b6 | ||
|
d7e3cc78ac | ||
|
be5c3b6959 | ||
|
632808ca4c | ||
|
bd4036fbff | ||
|
34c3829277 | ||
|
803d250bb6 | ||
|
4463fa107a | ||
|
73eb27456a | ||
|
a011de9e3f | ||
|
d9ae47bf2b | ||
|
862f96c560 | ||
|
86a9e51f9d | ||
|
a130aa414f | ||
|
a5d1f85040 | ||
|
96dc5b5a28 | ||
|
510366e12e | ||
|
df0a159391 | ||
|
4db63635fb | ||
|
c09d160d19 | ||
|
0969a8df83 | ||
|
214504a20e | ||
|
1ec47915d3 | ||
|
6a5e9401f7 | ||
|
ab9217049a | ||
|
5c9679c2ab | ||
|
7d0d2d1e65 | ||
|
397fc05ca8 | ||
|
5ee62dd86a | ||
|
9815d64691 | ||
|
db38039e97 | ||
|
b1e2e501d0 | ||
|
e847aa786d | ||
|
0a3442f389 | ||
|
7a4bb510fb | ||
|
e43be28452 | ||
|
9df6f22555 | ||
|
140dd2bd8a | ||
|
4d4cac629b | ||
|
2177ad1982 | ||
|
6bc7e04fe1 | ||
|
0b3bf9bc9f | ||
|
9894df4934 | ||
|
37ee2d4c54 | ||
|
a3defa4881 | ||
|
307205bb7f | ||
|
bf29e02320 | ||
|
d661d4235a | ||
|
8d205530cd | ||
|
70a044ee17 | ||
|
c6ad6e9c7f | ||
|
676ea011b8 | ||
|
4bb00c71da | ||
|
ce79420146 | ||
|
989815bec5 | ||
|
f02088fef1 | ||
|
4cf06cf52c | ||
|
fcbbc6c735 | ||
|
530367db09 | ||
|
504b1ea155 | ||
|
11ba96f088 | ||
|
07aed7d079 | ||
|
e2fd883224 | ||
|
1934bdfd47 | ||
|
808856dcc3 | ||
|
fee873d74a | ||
|
61bc4d1426 | ||
|
b95b23fec8 | ||
|
218e7bc5f1 | ||
|
7a53c2058f | ||
|
a16b509d84 | ||
|
be8b6e0b18 | ||
|
7d02374665 | ||
|
19d369816d | ||
|
3a79ff39fc | ||
|
7f4f3ecd21 | ||
|
77753f6ce0 | ||
|
67d6a8873b | ||
|
69ba006e97 | ||
|
0b3617668b | ||
|
7e4e683ce6 | ||
|
1d11b1a1a3 | ||
|
0dea5f8bb7 | ||
|
4293345c54 | ||
|
47bb805348 | ||
|
ef549d1ab5 | ||
|
3f84f43919 | ||
|
8931a8d36b | ||
|
13d98c22d7 | ||
|
15c959829f | ||
|
c0bea59c58 | ||
|
09ef003a81 | ||
|
723122211e | ||
|
8251e17eef | ||
|
861935de27 | ||
|
126a4201a0 | ||
|
523ae3aef4 | ||
|
4be885bf57 | ||
|
2a5a78565b | ||
|
97c2f06eda | ||
|
a70bbe5cff | ||
|
43f78f62b9 | ||
|
2d30283821 | ||
|
f59913b8e0 | ||
|
b497e7f72d | ||
|
6c9a720d2c | ||
|
6ea8b45d75 | ||
|
bf72f342a7 | ||
|
ea1cfad9b3 | ||
|
46d1b2f0f8 | ||
|
75441ef918 | ||
|
ea51c41b4a | ||
|
663738452f | ||
|
356e604bd2 | ||
|
468ffe9ead | ||
|
01f033bd8a | ||
|
71e38ad770 | ||
|
7423636e16 | ||
|
2af65585e0 | ||
|
f1cb4ea273 | ||
|
9dbc22e3e9 | ||
|
3faaa5d25d | ||
|
c7b10464a3 | ||
|
a4d1d03456 | ||
|
0aa21d4b3f | ||
|
165c3b892d | ||
|
f08880053f | ||
|
519a2b68b0 | ||
|
eb4aaf3994 | ||
|
e82c9e40de | ||
|
aa23d95e21 | ||
|
43625257b0 | ||
|
5e82afdbdd | ||
|
aa13f3c335 | ||
|
b62aeeb2ab | ||
|
2fd9d3f756 | ||
|
226ae4c10b | ||
|
98ff9e8795 | ||
|
3421c26270 | ||
|
95aeba415e | ||
|
c4e9d64600 | ||
|
b783185acc | ||
|
1353014bce | ||
|
0412b12e11 | ||
|
f383f8a914 | ||
|
cb5937c4a3 | ||
|
daa689beb5 | ||
|
83885f4d8b | ||
|
17dba653a9 | ||
|
1c1b5f965d | ||
|
ff5d61756f | ||
|
7d550d350e | ||
|
ea05677a7c | ||
|
c6cc4082ab | ||
|
c71f893aeb | ||
|
595d04c0c6 | ||
|
ff4f27175c | ||
|
36e0aa3ce1 | ||
|
9b098b816c | ||
|
d853971668 | ||
|
a0c9dc120c | ||
|
8e25aec9f5 | ||
|
fb3c8051fb | ||
|
b11fb62f55 | ||
|
2a7430dae8 | ||
|
e6003e3029 | ||
|
280cbf5cd4 | ||
|
d0e3f80506 | ||
|
1ea1a2664e | ||
|
f766614db0 | ||
|
99319d9fa7 | ||
|
1e627d81ce | ||
|
ceeb5b485c | ||
|
69021f884d | ||
|
c812d2e79b | ||
|
2be5451140 | ||
|
be8c1ad679 | ||
|
435440c7da | ||
|
9bfd3902a1 | ||
|
53ea6a8cd4 | ||
|
218ed09289 | ||
|
2c95c700c3 | ||
|
825198495e | ||
|
b9ce343e98 | ||
|
676906afae | ||
|
41ece38678 | ||
|
036b4acaab | ||
|
023f96d067 | ||
|
4e9b265c14 | ||
|
8e4e64c65d | ||
|
703a72850a | ||
|
329ad9dd80 | ||
|
7c0121dae2 | ||
|
bece676929 | ||
|
dc55cf9951 | ||
|
5eb4b71384 | ||
|
ef712c1ea8 | ||
|
01e9545d25 | ||
|
494b9eb61d |
95
.github/CMakeLists.txt
vendored
Normal file
95
.github/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
# This build script is not meant for general use, it is for CI use only!
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(implot)
|
||||
|
||||
#
|
||||
# Global options
|
||||
#
|
||||
|
||||
# Same as Dear ImGui
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
# Arch option for linux
|
||||
if (NOT APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" AND DEFINED GCC_ARCH)
|
||||
if ("${GCC_ARCH}" MATCHES "Win32|x86|32")
|
||||
add_compile_options(-m32)
|
||||
add_link_options(-m32)
|
||||
elseif ("${GCC_ARCH}" MATCHES "Win64|x64|64")
|
||||
add_compile_options(-m64)
|
||||
add_link_options(-m64)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Arch option for Mac: arm64 for M1 or x86_64 for intel (32 bits build are deprecated on Mac)
|
||||
if(APPLE AND DEFINED OSX_ARCH)
|
||||
if ("${OSX_ARCH}" MATCHES "x86_64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||
elseif ("${OSX_ARCH}" MATCHES "arm64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64")
|
||||
else()
|
||||
message(FATAL_ERROR "Unhandled OSX_ARCH=${OSX_ARCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#
|
||||
# Dear ImGui library with no backend
|
||||
#
|
||||
|
||||
set(imgui_sources
|
||||
../imgui/imconfig.h
|
||||
../imgui/imgui.cpp
|
||||
../imgui/imgui.h
|
||||
../imgui/imgui_demo.cpp
|
||||
../imgui/imgui_draw.cpp
|
||||
../imgui/imgui_internal.h
|
||||
../imgui/imgui_tables.cpp
|
||||
../imgui/imgui_widgets.cpp
|
||||
../imgui/imstb_rectpack.h
|
||||
../imgui/imstb_textedit.h
|
||||
../imgui/imstb_truetype.h
|
||||
)
|
||||
add_library(imgui ${imgui_sources})
|
||||
target_include_directories(imgui PUBLIC ../imgui)
|
||||
|
||||
#
|
||||
# ImPlot library
|
||||
#
|
||||
|
||||
file(GLOB SOURCE_CODE ../implot*.*)
|
||||
add_library(implot STATIC ${SOURCE_CODE})
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(implot PRIVATE /W4 /WX)
|
||||
else()
|
||||
target_compile_options(implot PRIVATE -Wall -Werror -pedantic)
|
||||
endif()
|
||||
|
||||
target_include_directories(implot PUBLIC ${CMAKE_CURRENT_LIST_DIR}/..)
|
||||
target_link_libraries(implot PUBLIC imgui)
|
||||
|
||||
if (UNIX)
|
||||
target_link_libraries(implot PUBLIC m stdc++)
|
||||
endif()
|
||||
|
||||
# Define supported types via command line:
|
||||
# - With no choice all types are supported (so that the CI provides support for all known types)
|
||||
# - with -DIMPLOT_CUSTOM_NUMERIC_TYPES="default" the default set defined in implot_items.cpp is used
|
||||
# - with -DIMPLOT_CUSTOM_NUMERIC_TYPES="(int)(float)(double)" only int, float and double are supported
|
||||
if (NOT DEFINED IMPLOT_CUSTOM_NUMERIC_TYPES)
|
||||
set(IMPLOT_CUSTOM_NUMERIC_TYPES "all")
|
||||
endif()
|
||||
if ("${IMPLOT_CUSTOM_NUMERIC_TYPES}" STREQUAL "default")
|
||||
message("==== Compiling for default types ====")
|
||||
elseif("${IMPLOT_CUSTOM_NUMERIC_TYPES}" STREQUAL "all")
|
||||
message("==== Compiling for all types ====")
|
||||
target_compile_definitions(implot PRIVATE "IMPLOT_CUSTOM_NUMERIC_TYPES=(signed char)(unsigned char)(signed short)(unsigned short)(signed int)(unsigned int)(signed long)(unsigned long)(signed long long)(unsigned long long)(float)(double)(long double)")
|
||||
else()
|
||||
message("==== Compiling for custom types: ${IMPLOT_CUSTOM_NUMERIC_TYPES} ====")
|
||||
target_compile_definitions(implot PRIVATE "IMPLOT_CUSTOM_NUMERIC_TYPES=${IMPLOT_CUSTOM_NUMERIC_TYPES}")
|
||||
endif()
|
||||
|
||||
#
|
||||
# implot example binary application (with no backend)
|
||||
#
|
||||
add_executable(example_implot example_implot.cpp)
|
||||
target_link_libraries(example_implot PRIVATE implot)
|
55
.github/example_implot.cpp
vendored
Normal file
55
.github/example_implot.cpp
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
// Sample app built with Dear ImGui and ImPlot
|
||||
// This app uses implot and imgui, but does not output to any backend! It only serves as a proof that an app can be built, linked, and run.
|
||||
|
||||
#include "imgui.h"
|
||||
#include "implot.h"
|
||||
#include "stdio.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
printf("sample_implot: start\n");
|
||||
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImPlot::CreateContext();
|
||||
|
||||
// Additional imgui initialization needed when no backend is present
|
||||
ImGui::GetIO().DisplaySize = ImVec2(400.f, 400.f);
|
||||
ImGui::GetIO().Fonts->Build();
|
||||
|
||||
// Render 500 frames
|
||||
for(int counter = 0; counter < 500; ++counter)
|
||||
{
|
||||
ImGui::NewFrame();
|
||||
|
||||
if (ImGui::Begin("Hello, world!"))
|
||||
{
|
||||
ImGui::Text("Hello again");
|
||||
|
||||
if (ImPlot::BeginPlot("My Plot"))
|
||||
{
|
||||
static double values[] = {1., 3., 5.};
|
||||
ImPlot::PlotLine("Values", values, 3);
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
|
||||
#ifdef IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES
|
||||
if (ImPlot::BeginPlot("My Plot (long double)"))
|
||||
{
|
||||
static long double values[] = {1., 3., 5.};
|
||||
ImPlot::PlotLine("Values", values, 3);
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
#endif
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
ImGui::Render();
|
||||
}
|
||||
|
||||
ImPlot::DestroyContext();
|
||||
ImGui::DestroyContext();
|
||||
printf("sample_implot: end\n");
|
||||
return 0;
|
||||
}
|
144
.github/workflows/build.yml
vendored
Normal file
144
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,144 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
Linux:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type:
|
||||
- debug
|
||||
- release
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
arch:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ocornut/imgui
|
||||
path: imgui
|
||||
|
||||
- name: Dependencies
|
||||
run: sudo apt-get install g++-multilib
|
||||
|
||||
- name: Configure
|
||||
run: cmake -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DGCC_ARCH=${{ matrix.arch }} -B cmake-build -S .github
|
||||
|
||||
- name: Build
|
||||
run: cmake --build cmake-build --parallel $(nproc)
|
||||
|
||||
- name: Run
|
||||
run: |
|
||||
file cmake-build/example_implot
|
||||
cmake-build/example_implot
|
||||
|
||||
MacOS:
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type:
|
||||
- debug
|
||||
- release
|
||||
arch:
|
||||
- x86_64
|
||||
- arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ocornut/imgui
|
||||
path: imgui
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DOSX_ARCH=${{ matrix.arch }} -B cmake-build -S .github
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: cmake --build cmake-build --parallel $(sysctl -n hw.ncpu)
|
||||
|
||||
- name: Run
|
||||
if: matrix.arch == 'x86_64' # github's CI hosts seem to be running intel and can not run ARM
|
||||
run: |
|
||||
file cmake-build/example_implot
|
||||
cmake-build/example_implot
|
||||
|
||||
Windows_MSVC:
|
||||
runs-on: windows-2022
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type:
|
||||
- debug
|
||||
- release
|
||||
arch:
|
||||
- Win32
|
||||
- x64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ocornut/imgui
|
||||
path: imgui
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: cmake -G 'Visual Studio 17 2022' -A ${{ matrix.arch }} -B cmake-build -S .github
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: cmake --build cmake-build -- -p:Configuration=${{ matrix.build_type }} -maxcpucount:$NUMBER_OF_PROCESSORS
|
||||
|
||||
- name: Run
|
||||
run: .\cmake-build\${{matrix.build_type}}\example_implot.exe
|
||||
|
||||
Windows_MingW: # MingW on Github CI does not fully support 32 bits: link fails when it tries to link 64 bits system libraries.
|
||||
runs-on: windows-2022
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type:
|
||||
- debug
|
||||
- release
|
||||
arch:
|
||||
- x64
|
||||
# - Win32
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ocornut/imgui
|
||||
path: imgui
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: cmake -G 'MinGW Makefiles' -DGCC_ARCH=${{ matrix.arch }} -B cmake-build -S .github
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: cmake --build cmake-build --parallel $NUMBER_OF_PROCESSORS
|
||||
|
||||
- name: Run (MingW)
|
||||
run: .\cmake-build\example_implot.exe
|
||||
|
32
.gitignore
vendored
32
.gitignore
vendored
|
@ -1,32 +0,0 @@
|
|||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
162
README.md
162
README.md
|
@ -1,52 +1,118 @@
|
|||
# ImPlot
|
||||
ImPlot is an immediate mode plotting widget for [Dear ImGui](https://github.com/ocornut/imgui). It aims to provide a first-class API that will make ImGui users feel right at home. ImPlot is well suited for visualizing program data in real-time and requires minimal code to integrate. Just like ImGui, it does not burden the end user with GUI state management, avoids STL containers and C++ headers, and has no external dependencies except for ImGui itself.
|
||||
ImPlot is an immediate mode, GPU accelerated plotting library for [Dear ImGui](https://github.com/ocornut/imgui). It aims to provide a first-class API that ImGui fans will love. ImPlot is well suited for visualizing program data in real-time or creating interactive plots, and requires minimal code to integrate. Just like ImGui, it does not burden the end user with GUI state management, avoids STL containers and C++ headers, and has no external dependencies except for ImGui itself.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/controls.gif" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/dnd.gif" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/log.gif" width="285">
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/controls.gif" width="270"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/dnd.gif" width="270"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/pie.gif" width="270">
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/bar.gif" width="285"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/query.gif" width="285">
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots/views.gif" width="285">
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/query.gif" width="270"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/bars.gif" width="270">
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/rt.gif" width="270">
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/stem.gif" width="270"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/markers.gif" width="270">
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/shaded.gif" width="270">
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/candle.gif" width="270"> <img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/heat.gif" width="270">
|
||||
<img src="https://raw.githubusercontent.com/wiki/epezent/implot/screenshots3/tables.gif" width="270">
|
||||
|
||||
## Features
|
||||
|
||||
- multiple plot types:
|
||||
- line
|
||||
- scatter
|
||||
- vertical/horizontal bars
|
||||
- error bars
|
||||
- GPU accelerated rendering
|
||||
- multiple plot types:
|
||||
- line plots
|
||||
- shaded plots
|
||||
- scatter plots
|
||||
- vertical/horizontal/stacked bars graphs
|
||||
- vertical/horizontal error bars
|
||||
- stem plots
|
||||
- stair plots
|
||||
- pie charts
|
||||
- heatmap charts
|
||||
- 1D/2D histograms
|
||||
- images
|
||||
- and more likely to come
|
||||
- mix/match multiple plot items on a single plot
|
||||
- configurable axes ranges and scaling (linear/log)
|
||||
- subplots
|
||||
- time formatted x-axes (US formatted or ISO 8601)
|
||||
- reversible and lockable axes
|
||||
- multiple x-axes and y-axes
|
||||
- controls for zooming, panning, box selection, and auto-fitting data
|
||||
- controls for creating persistent query ranges (see demo)
|
||||
- several plot styling options: 10 marker types, adjustable marker sizes, line weights, outline colors, fill colors, etc.
|
||||
- 16 built-in colormaps and support for and user-added colormaps
|
||||
- optional plot titles, axis labels, and grid labels
|
||||
- optional legend with toggle buttons to quickly show/hide items
|
||||
- size-aware grid with smart labels that are always power-of-ten multiples of 1, 2, and 5
|
||||
- default styling based on current ImGui theme, but most elements can be customized independently
|
||||
- mouse cursor location display and optional crosshairs cursor
|
||||
- customizable data getters and data striding (just like ImGui:PlotLines)
|
||||
- relatively good performance for high density plots
|
||||
- optional and configurable legends with toggle buttons to quickly show/hide plot items
|
||||
- default styling based on current ImGui theme, or completely custom plot styles
|
||||
- customizable data getters and data striding (just like ImGui:PlotLine)
|
||||
- accepts data as float, double, and 8, 16, 32, and 64-bit signed/unsigned integral types
|
||||
- and more! (see Announcements [2022](https://github.com/epezent/implot/discussions/370)/[2021](https://github.com/epezent/implot/issues/168)/[2020](https://github.com/epezent/implot/issues/48))
|
||||
|
||||
## Usage
|
||||
|
||||
The API is used just like any other ImGui `Begin`/`End` function. First, start a plotting context with `BeginPlot()`. Next, plot as many items as you want with the provided API functions (e.g. `Plot()`, `PlotBar()`, `PlotErrorBars()`, etc). Finally, wrap things up with a call to `EndPlot()`. That's it!
|
||||
The API is used just like any other ImGui `BeginX`/`EndX` pair. First, start a new plot with `ImPlot::BeginPlot()`. Next, plot as many items as you want with the provided `PlotX` functions (e.g. `PlotLine()`, `PlotBars()`, `PlotScatter()`, etc). Finally, wrap things up with a call to `ImPlot::EndPlot()`. That's it!
|
||||
|
||||
```cpp
|
||||
if (ImGui::BeginPlot("My Plot")) {
|
||||
ImGui::Plot("My Line Plot", x_data, y_data, 1000);
|
||||
ImGui::PlotBar("My Bar Plot", values, 10);
|
||||
int bar_data[11] = ...;
|
||||
float x_data[1000] = ...;
|
||||
float y_data[1000] = ...;
|
||||
|
||||
ImGui::Begin("My Window");
|
||||
if (ImPlot::BeginPlot("My Plot")) {
|
||||
ImPlot::PlotBars("My Bar Plot", bar_data, 11);
|
||||
ImPlot::PlotLine("My Line Plot", x_data, y_data, 1000);
|
||||
...
|
||||
ImGui::EndPlot();
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
ImGui::End();
|
||||
```
|
||||
|
||||
Consult `implot_demo.cpp` for a comprehensive example of ImPlot's features.
|
||||

|
||||
|
||||
|
||||
Of course, there's much more you can do with ImPlot...
|
||||
|
||||
## Demos
|
||||
|
||||
A comprehensive example of ImPlot's features can be found in `implot_demo.cpp`. Add this file to your sources and call `ImPlot::ShowDemoWindow()` somewhere in your update loop. You are encouraged to use this file as a reference when needing to implement various plot types. The demo is always updated to show new plot types and features as they are added, so check back with each release!
|
||||
|
||||
An online version of the demo is hosted [here](https://traineq.org/implot_demo/src/implot_demo.html). You can view the plots and the source code that generated them. Note that this demo may not always be up to date and is not as performant as a desktop implementation, but it should give you a general taste of what's possible with ImPlot. Special thanks to [pthom](https://github.com/pthom) for creating and hosting this!
|
||||
|
||||
More sophisticated demos requiring lengthier code and/or third-party libraries can be found in a separate repository: [implot_demos](https://github.com/epezent/implot_demos). Here, you will find advanced signal processing and ImPlot usage in action. Please read the `Contributing` section of that repository if you have an idea for a new demo!
|
||||
|
||||
## Integration
|
||||
|
||||
Just add `implot.h`, `implot.cpp`, and optionally `implot_demo.cpp` to your sources. This assumes you already have an ImGui-ready environment. If not, consider trying [mahi-gui](https://github.com/mahilab/mahi-gui), which bundles ImGui, ImPlot, and several other packages for you.
|
||||
0) Set up an [ImGui](https://github.com/ocornut/imgui) environment if you don't already have one.
|
||||
1) Add `implot.h`, `implot_internal.h`, `implot.cpp`, `implot_items.cpp` and optionally `implot_demo.cpp` to your sources. Alternatively, you can get ImPlot using [vcpkg](https://github.com/microsoft/vcpkg/tree/master/ports/implot).
|
||||
2) Create and destroy an `ImPlotContext` wherever you do so for your `ImGuiContext`:
|
||||
|
||||
```cpp
|
||||
ImGui::CreateContext();
|
||||
ImPlot::CreateContext();
|
||||
...
|
||||
ImPlot::DestroyContext();
|
||||
ImGui::DestroyContext();
|
||||
```
|
||||
|
||||
You should be good to go!
|
||||
|
||||
## Installing ImPlot using vcpkg
|
||||
|
||||
You can download and install ImPlot using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
./vcpkg integrate install
|
||||
./vcpkg install implot
|
||||
```
|
||||
|
||||
The ImPlot port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
## Extremely Important Note
|
||||
|
||||
Dear ImGui uses **16-bit indexing by default**, so high-density ImPlot widgets like `ImPlot::PlotHeatmap()` may produce too many vertices into `ImDrawList`, which causes an assertion failure and will result in data truncation and/or visual glitches. Therefore, it is **HIGHLY** recommended that you EITHER:
|
||||
|
||||
- **Option 1:** Enable 32-bit indices by uncommenting `#define ImDrawIdx unsigned int` in your ImGui [`imconfig.h`](https://github.com/ocornut/imgui/blob/master/imconfig.h#L89) file.
|
||||
- **Option 2:** Handle the `ImGuiBackendFlags_RendererHasVtxOffset` flag in your renderer if you must use 16-bit indices. Many of the default ImGui rendering backends already support `ImGuiBackendFlags_RendererHasVtxOffset`. Refer to [this issue](https://github.com/ocornut/imgui/issues/2591) for more information.
|
||||
|
||||
## FAQ
|
||||
|
||||
|
@ -54,43 +120,59 @@ Just add `implot.h`, `implot.cpp`, and optionally `implot_demo.cpp` to your sour
|
|||
|
||||
A: ImGui is an incredibly powerful tool for rapid prototyping and development, but provides only limited mechanisms for data visualization. Two dimensional plots are ubiquitous and useful to almost any application. Being able to visualize your data in real-time will give you insight and better understanding of your application.
|
||||
|
||||
**Q: Is ImPlot suitable for real-time plotting?**
|
||||
**Q: Is ImPlot the right plotting library for me?**
|
||||
|
||||
A: Yes, within reason. You can plot tens to hundreds of thousands of points without issue, but don't expect plotting over a million to be a buttery smooth experience. We do our best to keep it fast and avoid memory allocations.
|
||||
A: If you're looking to generate publication quality plots and/or export plots to a file, ImPlot is NOT the library for you! ImPlot is geared toward plotting application data at realtime speeds with high levels of interactivity. ImPlot does its best to create pretty plots (indeed, there are quite a few styling options available), but it will always favor function over form.
|
||||
|
||||
**Q: Where is the documentation?**
|
||||
|
||||
A: The API is thoroughly commented in `implot.h`, and the demo in `implot_demo.cpp` should be more than enough to get you started. Also take a look at the [implot_demos](https://github.com/epezent/implot_demos) repository.
|
||||
|
||||
**Q: Is ImPlot suitable for plotting large datasets?**
|
||||
|
||||
A: Yes, within reason. You can plot tens to hundreds of thousands of points without issue, but don't expect millions to be a buttery smooth experience. That said, you can always downsample extremely large datasets by telling ImPlot to stride your data at larger intervals if needed. Also try the experimental `backends` branch which aims to provide GPU acceleration support.
|
||||
|
||||
**Q: What data types can I plot?**
|
||||
|
||||
A: ImPlot plotting functions accept most scalar types:
|
||||
`float`, `double`, `int8`, `uint8`, `int16`, `uint16`, `int32`, `uint32`, `int64`, `uint64`. Arrays of custom structs or classes (e.g. `Vector2f` or similar) are easily passed to ImPlot functions using the built-in striding features (see `implot.h` for documentation), and many plotters provide a "getter" overload which accepts data generating callbacks. You can fully customize the list of accepted types by defining `IMPLOT_CUSTOM_NUMERIC_TYPES` at compile time: see doc in `implot_items.cpp`.
|
||||
|
||||
**Q: Can plot styles be modified?**
|
||||
|
||||
A: Yes. Plot colors, palettes, and various styling variables can be pushed/popped or modified permanently on startup.
|
||||
A: Yes. Data colormaps and various styling colors and variables can be pushed/popped or modified permanently on startup. Three default styles are available, as well as an automatic style that attempts to match you ImGui style.
|
||||
|
||||
**Q: Does ImPlot support logarithmic scaling?**
|
||||
**Q: Does ImPlot support logarithmic scaling or time formatting?**
|
||||
|
||||
A: Yep!
|
||||
A: Yep! Both logscale and timescale are supported.
|
||||
|
||||
**Q: Does ImPlot support multiple y-axes? x-axes?**
|
||||
|
||||
A: Yes. Up to three x-axes and three y-axes can be enabled.
|
||||
|
||||
**Q: Does ImPlot support [insert plot type]?**
|
||||
|
||||
A: Maybe. Check the gallery and demo to see if your desired plot type is shown. If not, consider submitting an issue or better yet, a PR!
|
||||
A: Maybe. Check the demo, gallery, or Announcements ([2020](https://github.com/epezent/implot/issues/48)/[2021](https://github.com/epezent/implot/issues/168))to see if your desired plot type is shown. If not, consider submitting an issue or better yet, a PR!
|
||||
|
||||
**Q: Does ImPlot support 3D plots?**
|
||||
|
||||
A: No, and likely never will since ImGui only deals in 2D rendering.
|
||||
|
||||
**Q: My plot lines look like crap!**
|
||||
|
||||
A: By default, no anti-aliasing is done on line plots for performance gains. If you use at least 4x MSAA, then you likely won't even notice. However, you can enable software AA per-plot with the `ImPlotFlags_AntiAliased` flag, or globally with `ImPlot::GetStyle().AntiAliasedLines = true;`.
|
||||
|
||||
**Q: Does ImPlot provide analytic tools?**
|
||||
|
||||
A: Not exactly, but it does give you the ability to query plot sub-ranges, with which you can process your data however you like.
|
||||
A: Not exactly, but it does give you the ability to query plot sub-ranges, with which you can process your data however you like.
|
||||
|
||||
**Q: Can plots be exported/saved to image?**
|
||||
|
||||
A: Not currently. Use your OS's screen capturing mechanisms if you need to capture a plot. ImPlot is not suitable for rendering publication quality plots; it is only intended to be used as a visualization tool. Post-process your data with MATLAB and matplotlib for these purposes.
|
||||
A: Not currently. Use your OS's screen capturing mechanisms if you need to capture a plot. ImPlot is not suitable for rendering publication quality plots; it is only intended to be used as a visualization tool. Post-process your data with MATLAB or matplotlib for these purposes.
|
||||
|
||||
**Q: Can I compile ImPlot as a dynamic library?**
|
||||
|
||||
A: Like ImGui, it is recommended that you compile and link ImPlot as a *static* library or directly as a part of your sources. However, if you must and are compiling ImPlot and ImGui as separate DLLs, make sure you set the current *ImGui* context with `ImPlot::SetImGuiContext(ImGuiContext* ctx)`. This ensures that global ImGui variables are correctly shared across the DLL boundary.
|
||||
|
||||
**Q: Can ImPlot be used with other languages/bindings?**
|
||||
|
||||
A: Yes, you can use the C binding, [cimplot](https://github.com/cimgui/cimplot) with most high level languages.
|
||||
|
||||
## Special Notes
|
||||
- By default, no anti-aliasing is done on line plots for performance reasons. If you use 4x MSAA, then you likely won't even notice. However, you can re-enable AA with the `ImPlotFlags_AntiAliased` flag.
|
||||
- If you plan to render several thousands lines or points, then you should consider enabling 32-bit indices by uncommenting `#define ImDrawIdx unsigned int` in your `imconfig.h` file, OR handling the `ImGuiBackendFlags_RendererHasVtxOffset` flag in your renderer (the official OpenGL3 renderer supports this). If you fail to do this, then you may at some point hit the maximum number of indices that can be rendered.
|
||||
|
||||
## See Also
|
||||
[ImPlot discussion](https://github.com/ocornut/imgui/issues/3173) - ImPlot discussion issue at the official ImGui repository
|
||||
|
||||
[imgui-plot](https://github.com/soulthreads/imgui-plot) - an alternate plotting widget by soulthreads
|
||||
A: Yes, you can use the generated C binding, [cimplot](https://github.com/cimgui/cimplot) with most high level languages. [DearPyGui](https://github.com/hoffstadt/DearPyGui) provides a Python wrapper, among other things. [imgui-java](https://github.com/SpaiR/imgui-java) provides bindings for Java. A Rust binding, [implot-rs](https://github.com/4bb4/implot-rs), is currently in the works. An example using Emscripten can be found [here](https://github.com/pthom/implot_demo).
|
||||
|
|
100
TODO.md
Normal file
100
TODO.md
Normal file
|
@ -0,0 +1,100 @@
|
|||
The list below represents a combination of high-priority work, nice-to-have features, and random ideas. We make no guarantees that all of this work will be completed or even started. If you see something that you need or would like to have, let us know, or better yet consider submitting a PR for the feature.
|
||||
|
||||
## API
|
||||
|
||||
## Axes
|
||||
|
||||
- add flag to remove weekends on Time axis
|
||||
- pixel space scale (`ImPlotTransform_Display`), normalized space scale (`ImPlotTransform_Axes`), data space scale (`ImPlotTransform_Data`)
|
||||
- make ImPlotFlags_Equal not a flag -> `SetupEqual(ImPlotAxis x, ImPlotAxis y)`
|
||||
- allow inverted arguments `SetAxes` to transpose data?
|
||||
- `SetupAxisColors()`
|
||||
- `SetupAxisHome()`
|
||||
|
||||
## Plot Items
|
||||
|
||||
- add `PlotBubbles` (see MATLAB bubble chart)
|
||||
- add non-zero references for `PlotBars` etc.
|
||||
- add exploding to `PlotPieChart` (on hover-highlight?)
|
||||
- fix appearance of `PlotBars` spacing
|
||||
|
||||
## Styling
|
||||
|
||||
- support gradient and/or colormap sampled fills (e.g. ImPlotFillStyle_)
|
||||
- API for setting different fonts for plot elements
|
||||
|
||||
## Colormaps
|
||||
|
||||
- gradient editing tool
|
||||
- `RemoveColormap`
|
||||
- `enum ImPlotColorRule_ { Solid, Faded, XValue, YValue, ZValue }`
|
||||
|
||||
## Legend
|
||||
|
||||
- `ImPlotLegendFlags_Scroll`
|
||||
- improve legend icons (e.g. adopt markers, gradients, etc)
|
||||
- make legend frame use ButtonBehavior (maybe impossible)
|
||||
|
||||
## Tools / Misc.
|
||||
|
||||
- add `IsPlotChanging` to detect change in limits
|
||||
- add ability to extend plot/axis context menus
|
||||
- add LTTB downsampling for lines
|
||||
- add box selection to axes
|
||||
- first frame render delay might fix "fit pop" effect
|
||||
- move some code to new `implot_tools.cpp`
|
||||
- ColormapSlider (see metrics)
|
||||
- FillAlpha should not affect markers?
|
||||
- fix mouse text for time axes
|
||||
|
||||
## Optimizations
|
||||
|
||||
- find faster way to buffer data into ImDrawList (very slow)
|
||||
- reduce number of calls to `PushClipRect`
|
||||
- explore SIMD operations for high density plot items
|
||||
|
||||
## Plotter Pipeline
|
||||
|
||||
Ideally every `PlotX` function should use our faster rendering pipeline when it is applicable.
|
||||
|
||||
` User Data > Getter > Fitter > Renderer > RenderPrimitives`
|
||||
|
||||
|Plotter|Getter|Fitter|Renderer|RenderPrimitives|
|
||||
|---|:-:|:-:|:-:|:-:|
|
||||
|PlotLine|Yes|Yes|Yes|Yes|
|
||||
|PlotScatter|Yes|Yes|Yes|Yes|
|
||||
|PlotStairs|Yes|Yes|Yes|Yes|
|
||||
|PlotShaded|Yes|Yes|Yes|Yes|
|
||||
|PlotBars|Yes|Yes|Yes|Yes|
|
||||
|PlotBarGroups|:|:|:|:|
|
||||
|PlotHistogram|:|:|:|:|
|
||||
|PlotErrorBars|Yes|Yes|No|No|
|
||||
|PlotStems|Yes|Yes|Yes|Yes|
|
||||
|PlotInfLines|Yes|Yes|Yes|Yes|
|
||||
|PlotPieChart|No|No|No|No|
|
||||
|PlotHeatmap|Yes|No|Yes|Mixed|
|
||||
|PlotHistogram2D|:|:|:|:|
|
||||
|PlotDigital|Yes|No|No|No|
|
||||
|PlotImage|-|-|-|-|
|
||||
|PlotText|-|-|-|-|
|
||||
|PlotDummy|-|-|-|-|
|
||||
|
||||
## Completed
|
||||
- make BeginPlot take fewer args:
|
||||
- make query a tool -> `DragRect`
|
||||
- rework DragLine/Point to use ButtonBehavior
|
||||
- add support for multiple x-axes and don't limit count to 3
|
||||
- make axis side configurable (top/left, right/bottom) via new flag `ImPlotAxisFlags_Opposite`
|
||||
- add support for setting tick label strings via callback
|
||||
- give each axis an ID, remove ad-hoc DND solution
|
||||
- allow axis to be drag to opposite side (ala ImGui Table headers)
|
||||
- legend items can be hovered even if plot is not
|
||||
- fix frame delay on DragX tools
|
||||
- remove tag from drag line/point -> add `Tag` tool
|
||||
- add shortcut/legacy overloads for BeginPlot
|
||||
- `SetupAxisConstraints()`
|
||||
- `SetupAxisScale()`
|
||||
- add `ImPlotLineFlags`, `ImPlotBarsFlags`, etc. for each plot type
|
||||
- add `PlotBarGroups` wrapper that makes rendering groups of bars easier, with stacked bar support
|
||||
- `PlotBars` restore outlines
|
||||
- add hover/active color for plot axes
|
7408
implot.cpp
7408
implot.cpp
File diff suppressed because it is too large
Load Diff
3014
implot_demo.cpp
3014
implot_demo.cpp
File diff suppressed because it is too large
Load Diff
1667
implot_internal.h
Normal file
1667
implot_internal.h
Normal file
File diff suppressed because it is too large
Load Diff
2692
implot_items.cpp
Normal file
2692
implot_items.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user