problem of axis accuracy. rounding values #327
Unanswered
antoinech13
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, i encounter a little problem.
I try to do a simple
plot(x, y)
wherex
andy
are twostd::vector<double>
(values ofx
are looking like 58539.1659 andy
look like 16.152)my problem is when i pass this vectors to the plot function. The graphe produced have rounded axis.
as exemple, imagine my data set is:
x = { 58539.1489, 58539.1235, 58539.1659, 58539.1786, 58539.19161, 58539.2055}
then all values will be stack on 58539.1 and 58539.2.
for
y
axis is the same but the rounding is more accurate.That also happen when i try to display with cout function the content of this vector but in this case,
std::setprecision
allow me to display it well.I also used the variable explorer with some breaking points to check x and y and this vectors are not rounded.
So how can i do something similar to what do
stprecision
for cout but for matplot++?thank you in advance.
ps: i use vs2022 under windows.
Beta Was this translation helpful? Give feedback.
All reactions