I would like to do a simple scatter plot from values I calculated thanks to freefem++.
the plot fonction doesn’t seem to work …
I tried to use it like this :
Do i have to geet my values on an other programming language in order to plot them?
Thank you for your time and help !
One thing that I liked about FF was the way you could do 2D and 3D plots without
temp files. Other packages support that to some degree probably but in general viewers
work on files. I found out that paraview has an “in-situ” mode or way to interact with
live code but someone would need to write an FF interface. After investigating on
message boards, I found someone at a national US lab had done something like that
for R and thought it would be useful more generally.
There seem to be features in FF that I don’t know about or don’t work on my current
version but I’m doing that plotting now with “mjmdatascope” since I can use it with FF
and R and my own c++ code. I guess if there is demand I could clean it up and “ship
it.” While I use it its not really stable to say the least,
and you can see the “swarmalator” example of real time scatterplots but
I don’t have that in a FF thing yet.
@brrrr , Actually, the
plot function allows you to produce scatter plots using the syntax in your example (although it plots a line, not a scatter plot, to be precise, and there is no way to change the type of line, its thickness or its color, or I don’t know how to).
For your code to work, you need the pairs of variables in square brackets
[value00,value01] to be arrays of
y values that specify the
x(y) graph. That is,
value00 is an array of
x values and
value01 is an array of y values (same size as
value00). If you need multiple scatter plots, use
plot([Xarray1,Yarray1] , [Xarray2,Yarray2], [Xarray3,Yarray3]...).