How can I efficiently plot data that varies over time?

In summary, the speaker is having trouble finding a way to efficiently plot data that varies over time. They have written a program that outputs three lists of numbers and want to be able to plot two of the lists against each other in a single plot for a specific time. They have tried using MATLAB and maple but have not been successful. The speaker has minimal programming knowledge outside of C and is looking for advice on how to proceed, whether through a GUI or command line. Another person, Kerry, has successfully done similar tasks in MATLAB and is asking for more details on the specific difficulties the speaker is facing.
  • #1
Kudaros
18
0
I am having a difficult time finding a way to efficiently plot something that varies over time. I have written a program that outputs three lists of numbers like:

time space value
x
y
z
.
.
.

I want to be able to input those lists and plot 'space' and 'value' against each other in a single plot for time =x and then, perhaps, press a button and move onto the next time.

I have access to MATLAB and maple and I've toyed around with it for hours. Short of plotting all of these time frames manually, I am not sure how I would go about doing this.

It is probably helpful to note that my programming knowledge is minimal for anything outside of C.

Thanks!
 
Physics news on Phys.org
  • #2
I've done things like this in MATLAB. Why do you think it will be difficult? What are you getting hung up on? Do you want a GUI or are you looking for something you can run from the command line?

-Kerry
 
  • #3


I understand your struggle in finding an efficient way to plot data that varies over time. I would suggest using a 3-D plot instead of a 2-D plot, as it would allow you to visualize all three variables (time, space, and value) simultaneously. You can use MATLAB or Maple to create a 3-D plot by inputting your three lists of numbers.

Alternatively, you can also use a line plot to show the variation of 'value' over time for a specific 'space'. This can be achieved by plotting a line for each space value and using the time as the x-axis.

If you want to plot 'space' and 'value' against each other for a specific time, you can use a scatter plot. This will allow you to see the relationship between the two variables at a particular time.

If you want to automate the process of plotting for different time frames, you can write a loop in your program to plot the data for each time frame sequentially. This will save you time and effort in manually plotting each time frame.

I understand that your programming knowledge may be limited, but with some practice and utilizing the resources available in MATLAB or Maple, you should be able to create the desired plot efficiently. I hope this helps. Good luck with your research!
 

FAQ: How can I efficiently plot data that varies over time?

1. What is a 2-D plot that varies over time?

A 2-D plot that varies over time is a graphical representation of data that shows how two variables change in relation to each other over a period of time. The x-axis typically represents time and the y-axis represents the varying data.

2. How is a 2-D plot that varies over time different from a regular 2-D plot?

A 2-D plot that varies over time differs from a regular 2-D plot in that it shows the relationship between two variables over a period of time, rather than just a single moment in time. This allows for a better understanding of how the data changes over time and any patterns or trends that may exist.

3. What are some common types of 2-D plots that vary over time?

Some common types of 2-D plots that vary over time include line graphs, scatter plots, and bar graphs. Each of these can be used to show how two variables change over time, but they may be better suited for different types of data and patterns.

4. Why is it important to use a 2-D plot that varies over time?

A 2-D plot that varies over time is important because it allows for a visual representation of how two variables are related and how they change over time. This can help to identify any patterns or trends in the data and can aid in making predictions or decisions based on the data.

5. How can I create a 2-D plot that varies over time?

You can create a 2-D plot that varies over time using various software or programming tools such as Excel, Python, or R. These programs have built-in functions and tools for creating and customizing different types of 2-D plots. You can also use online graphing tools or manually plot the data on graph paper if needed.

Similar threads

Replies
2
Views
2K
Replies
5
Views
2K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
2
Views
2K
Back
Top