How Can I Show the Velocity Profile Gradient in a 2-D Plot Using GNUplot?

  • Thread starter Thread starter bert2002
  • Start date Start date
  • Tags Tags
    Gnuplot
AI Thread Summary
The discussion centers on creating a 2-D plot to visualize seismic wave propagation, specifically incorporating a velocity profile gradient into the background of the plot. The user has a defined velocity profile equation and successfully plots ray paths but struggles to represent the velocity changes visually. Key suggestions include using color to depict scalar quantities on the x-z plane and considering vector fields for vector quantities. The conversation emphasizes the need to clarify whether the velocity is treated as a scalar or vector, with the consensus being that the ray path is a vector while the velocity profile produces a scalar field. Recommendations for using visualization tools like GNUplot or matplotlib are provided, highlighting the importance of exploring documentation for features like contour and colormap to achieve the desired representation.
bert2002
Messages
16
Reaction score
0

Homework Statement



I have written a program that desribes seismic wave propagation in a medium that has been given a specific velocity profile equation. The velocity at a specific x and z co-ordinate of the ray path is defined by this particular equation, and of course the velocity will vary depending on the position of the ray path .

I am trying to create a 2-D plot of the ray paths of x (horizontal) and z (vertical) position which i can do fine BUT i am having trouble in trying to show the velocity profile gradient as part of the background of the plot. I would like to be able to see exactly how the velocity profile changes with position and how this has affected the ray path.


Homework Equations



Here is an example of an arbitrary velocity profile equation that i have been using

v=a+bsin(cx)+dcos(ez)

Thanks
 
Last edited:
Technology news on Phys.org
So, what exactly is the question?
are you looking for ideas on how to present the information?
what's the information?

if you have a scalar quantity, you can use color to represent the magnitude in the 2D x-z plane

if you have a vector, well, you use a vector field.

I think of velocity as a vector and speed as a scalar, so, I am not sure what you got as you call it velocity but seems to be a scalar.
 
gsal said:
So, what exactly is the question?
are you looking for ideas on how to present the information?
what's the information?

if you have a scalar quantity, you can use color to represent the magnitude in the 2D x-z plane

if you have a vector, well, you use a vector field.

I think of velocity as a vector and speed as a scalar, so, I am not sure what you got as you call it velocity but seems to be a scalar.

Well the ray path is a vector quantity but the velocity profile equation will produce a scalar field for each point on the x/z plane.

as you say, i am looking to use colour to represent the magnitude of the scalar field in a 2-D plane, how can i do this ?

Thanks
 
I wouldn't know how to do that in GNUplot, I use matplotlib.

You need to read the docs, look for something along the lines of contour, colormap, cmap, image-showing commands, etc.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top