Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calling all GNUplot experts

  1. Feb 5, 2014 #1
    1. The problem statement, all variables and given/known data

    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.


    2. Relevant equations

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

    [tex]v=a+bsin(cx)+dcos(ez)[/tex]

    Thanks
     
    Last edited: Feb 5, 2014
  2. jcsd
  3. Feb 6, 2014 #2
    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.
     
  4. Feb 7, 2014 #3
    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
     
  5. Feb 7, 2014 #4
    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Calling all GNUplot experts
Loading...