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

Gnuplot matrix plot

  1. Mar 2, 2016 #1
    I have a .txt file which is 50 rows x 50 columns filled with entirely 0's and 1's.

    I have tried to plot the data with and without spaces between each column.

    I keep getting this message:

    gnuplot> splot 'C:\Users\raf\Desktop\PolymerProject\monte carlo code\directionInitial.txt' with pm3d
    warning: Skipping unreadable file "C:\Users\raf\Desktop\PolymerProject\monte carlo code\directionInitial.txt"
    warning: No usable data in this plot to auto-scale axis range
    All points x value undefined

    None of the advice online seems help/solve my problem. New to gnuplot so excuse me if this is obvious.
  2. jcsd
  3. Mar 2, 2016 #2


    Staff: Mentor

    Please post your code. Attaching your text file might be helpful, as well.
  4. Mar 2, 2016 #3
    This what I enter into the command box:

    gnuplot> set pm3d map
    gnuplot> splot 'C:\Users\raf\Desktop\PolymerProject\monteCarloCode\directionInitial.txt'

    As I said I've tried various different spacings in the .txt file.

    Attached Files:

  5. Mar 2, 2016 #4
    Just as I read my post back I realized I have entered the incorrect path file.
  6. Mar 2, 2016 #5


    Staff: Mentor

    I found this documentation -- http://theochem.ki.ku.dk/on_line_docs/gnuplot/gnuplot_36.html
    Your data file doesn't seem to match the format used in this example.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted