Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ploting dot
#1
Hi everyone !
i have a problem for ploting my results the way i want.

I have a list of results of a function F(x,tau).
my results are in a "list of lists" like[[F(x1,tau1),F(x1,tau2),F(x1,tau3),...][F(x2,tau1),F(x2,tau2),F(x2,tau3)...]...]
i want to plot these in a graph x-tau but i don t know how..

thanks for the help !

Sorry i am not expressiong the problem right.
I stille have this list of list [[F(x1,tau1),F(x1,tau2),F(x1,tau3),...][F(x2,tau1),F(x2,tau2),F(x2,tau3)...]...].
for each value of (x,tau) there is a value of F(x,tau). I would like to plot a graph with all the dots in a graph x-tau and then plot the isocontours. (link every dots which have the same value)
Reply
#2
what have you tried so far?
If you haven't written any code yet, what are your thoughts on how to approach the problem?
Reply
#3
is this for a paper plotter like one that moves a pen around? how big does the dot need to be? how dark does it need to be?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
Look at countourf function from the matplotlib package.

In general, pseudocode for your task would be the following:

from matplotlib import pyplot as plt
import numpy as np

list_of_lists = np.array(list_of_lists) # probably you will need to convert your data to numpy 2d array

X, Y = np.meshgrid([tau1, ... , tauN], [x1, ... , xM]) # pseudocode!
# probably you would use X, Y = np.meshgrid(np.linspace(tau1, tauN, 100), np.linspace(x1, xM, 100)) instead
plt.countourf(X, Y, list_of_lists)
plt.show()
Note: this is pseudocode only, you need to adopt it for your needs.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Ploting single column with multiple category drunkenneo 1 1,989 May-26-2021, 04:51 PM
Last Post: jefsummers
  Ploting polar chart with circumference as Zero ibaad1406 0 1,234 Feb-10-2020, 05:53 PM
Last Post: ibaad1406

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020