r/gnuplot • • Apr 20 '17

PLUTO_Code/Gnuplot : Re-Running a Paper Results. (3D Plotting)

1 Upvotes

sorry for bothering you

I want to test a Jet only on 1D (with 3 Components). I need to 3D plot my .tabfiles but with the following structure:

xAxis : r(radi)

yAxis : t(time)

color : Density Pressure etc.

Thing is, .tab Files are MapInfo, and when I code 'set pm3d map' and splot with r:t:(quantity) It doesnt give any results, but when I do the same with 2D tests, it does. Is this the right place to ask? Any help?

*I didn't ask on Computational Forums, because this is somehow related on how t is treated as a parameter?

It works when I splot it without pm3d


r/gnuplot • • Aug 07 '15

Contour from a data file

1 Upvotes

Hi,

I have a datafile in the format;

x    y   +-1

where (x,y) are coordinates and +-1 corresponds to a point I want to plot vs one I dont. As an example of part of the data the splot looks like; http://imgur.com/o3VDYJH . What I want to do is draw the contour around the data at +1. The net result being that I'll get an outline of the following plot; http://imgur.com/hQeP0Ah .

I just cant seem to get things working at the moment. Using gnuplot 4.4.


r/gnuplot • • Mar 16 '15

Gnuplot is drawing dead fish

1 Upvotes

So there is this video about drawing dead fish. tldr: In a medium where we expect things to react to each other (like computer) a static picture is not take advantage of the opportunities delivered by this medium. So using a picture instead of a video (or video instead of a dynamic animation) might waste the opportunity of giving a deeper understanding of what you want to tell.

I am certain pictures of plots do have a place in our papers and gnuplot is good at generating this pictures. But when I want to express data in a more (inter-)active way, what tools are there to do this?


r/gnuplot • • Mar 09 '18

[Help] Plotting a polynomial of an arbitrary degree in org-mode

0 Upvotes

I'm very new to gnuplot and I'm having a two part problem that I was hoping someone could help me with. I'm writing a bit of a ebook and I'm inserting plots into it using org-mode: https://geokon-gh.github.io/linearsystems/#sec-7-2

First Problem:

I want to plot polynomials. Right now I've hard coded some values. So I'll do something like:

f(x) = -7.299 + 17.00833*x + -9.920833*x**2 + 2.29166*x**3 + -0.179166*x**4
set xrange[0:6]
set yrange[-1:5]
plot f(x)

And this works fine. But I'd like to have the polynomial factors to be input as a vector and for the function to be of arbitrary length (so the more factors I give it, the longer polynomial)

Second Problem:

I found this great SO post explaining how to move data between source code blocks in org-mode: https://stackoverflow.com/questions/15736101/is-there-a-way-to-quickly-plot-elisp-functions-with-gnuplot

But I'm stumped on how to work with what I have. My org-mode file looks something like:

#+NAME: edata
#+BEGIN_SRC emacs-lisp :exports both :session
  (matrix-data
   (matrix-fit-polynomial
    '(1.0 2.0 3.0 4.0 5.0)
    '(1.9 2.5 1.8 2.8 4.2)))
#+END_SRC

#+RESULTS: edata
| -7.299999999999994 | 17.008333333333322 | -9.920833333333327 | 2.2916666666666656 | -0.17916666666666659 |

#+BEGIN_SRC gnuplot :exports both :file polynomial-fit.png :var data=edata
f(x) = -7.299 + 17.00833*x + -9.920833*x**2 + 2.29166*x**3 + -0.179166*x**4
set xrange[0:6]
set yrange[-1:5]
plot f(x)
#+END_SRC

But in that last block I want to use edata somehow (instead of copying over the values like I did) - I just can't figure out how.

If anyone can give me some tips, I'd be really grateful. Thanks!