Visualizing array data. #2051
Answered
by
paxcut
LupusTheCanine
asked this question in
Get Help
-
how can I visualize values of timestamp as a line plot? |
Beta Was this translation helpful? Give feedback.
Answered by
paxcut
Jan 5, 2025
Replies: 1 comment
-
Currently only arrays of floats can be plotted as an line plot so you need to create a section to have the data converted from u32 to float. This is one way you could do that: import std.mem;
std::mem::Section provider=std::mem::create_section("Provider");
struct dat{
u32 timestamp;
s16 data[4*8];
};
struct A {
float data[64];
}[[hex::visualize("line_plot", data)]];
dat a[64] @ 0;
A plot@0 in provider;
for (u32 i=0,i<64,i+=1) {
plot.data[i] = float(a[i].timestamp);
} To view the plot click on the sections tab and on the icon on the rigth side. When hex editor opens click on the eye on the data column of the pattern data for the section. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LupusTheCanine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently only arrays of floats can be plotted as an line plot so you need to create a section to have the data converted from u32 to float. This is one way you could do that:
To view the plot click on the sections tab and on the icon on the rigth side. When hex editor opens click on the eye on the data column of the pattern data for the section.