Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

To see the different values in the plot

Help
2010-11-20
2013-02-10
  • Cyril Angel
    Cyril Angel
    2010-11-20

    Hello :)

    I try to represent the galactic dust in our galaxy with a program in C language. My program works and now I want to do this but I didn't succeed with Gnuplot. Is it possible ?



    I want to see the value of the quantity of dust in each "box".

    Thank you

    Sorry for my bad english.

     
  • Ethan Merritt
    Ethan Merritt
    2010-11-20

    a = 10    # or whatever
    b = 5
    f(x,y) = a*x + b*y
    set view map
    set xrange
    set yrange

    splot f(x,y) with pm3d

    # if you like to have lines also

    splot f(x,y) with pm3d, f(x,y) with lines lc rgb "black" notitle

     
  • Cyril Angel
    Cyril Angel
    2010-11-21

    Thank you for the answer !

    But I'm sorry, I my explication was not good.

    In my program, I have a loop and I put the value of f(x,y) in a file (x and y are in the file too).
    I tried:

    splot "namefile.txt" with pm3d
    set view map
    replot

    and I have nothing in my plot (no color, no value) but the axis are correct.

    Thank you