1
$\begingroup$

I want to track the nutritional value of different flours over time. What I got so far is a data table like this:

|------------|------------|------------|------------|
|   Flour    |   Date     |   Energy   |   Sugar    |
|------------|------------|------------|------------|
|   type 1   |   03/20    |   310      |   2        |
|   type 2   |   03/20    |   290      |   1.8      |
|   type 1   |   04/20    |   310      |   2.1      |
|   type 2   |   04/20    |   287      |   1.7      |

Over time, I will add more nutritional values for the flours already in the table and might add more types of flour. I might also want to add additional columns e.g. for protein. The nutritional values of the different flour types should then be plotted over time like this:

Energy
|
|     *         *             * type 1
|     #                       # type 2
|               #
|
|-----------------------Date
    03/20     04/20

What are the best tools to implement such a project? My constraints are that I only want to use free and open-source software which runs under Arch Linux and that that i can export the plots

$\endgroup$
  • $\begingroup$ well on Arch Linux, you can use gnuplot or matplotlib (python library). $\endgroup$ – Oscar May 29 at 19:36
0
$\begingroup$

I would recommend the Python libraries: matplotlib and seaborn for generating and exporting static plots, or Plotly for interactive plots with hover features that you can export to a web browser.

| improve this answer | |
$\endgroup$
0
$\begingroup$

I suggest R. It allows for easy data handling including a good GUI (RStudio) and high-quality plotting tools (e.g. ggplot2).

df = data.frame(c(1,2,3,4,3,4,8,6,2,3),c(5,4,3,6,5,4,2,6,7,8),c(1,2,3,4,5,6,7,8,9,10))
colnames(df)<-c("a","b","c")
df

library(reshape)
df2 = melt(data = df, measure.vars = c("a", "b"))

library(ggplot2)
ggplot(df2, aes(x = c, y = value, colour = variable)) + 
  geom_smooth() + geom_point() +
  xlab("My x") + ylab("My y") +
  ggtitle("My ggplot") +
  labs(color='Type') 

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.