5

I want to draw a plot with the points:

y >= f(x)

where f(x) is some function I define.

Using an x-y plot, I can draw only the function:

y = f(x)

Using an area plot, I can draw an area of a single column (i.e. not y as a function of x). Is there any way I can fill the area above the x-y curve?

EDIT: When the x values are linear (i.e. 0, 1, 2, ...) then it is easy to fill the area below the curve by using an area plot with the y series only, like here (right):

enter image description here

2 Answers 2

2

I don't know whether it is possible in Libreoffice Calc, so I advise you to use another program for doing the plot. If you don't want to learn the syntax of a program with serious plotting capabilities, like R or gnuplot, you can use geogebra.

sudo apt-get install geogebra

Then just launch geogebra, and write in the Input field at the bottom of the window, e.g:

y>=x^2

and your graph is plotted. You can right-click on the object to change its properties (color, line width, etc.). After you are done, just Move the graphics plan to the position you want the graph to be displayed and use the Export option from the File menu. E.g export into .png then insert the image into Calc.

geogebra is a very handy tool for simple plotting, it is very easy to make animated plots in it also.

1

LibreOffice Calc doesn't allow for editing the area above / below a X/Y data series (line). So i see the following options:

  • try to use a area chart type;

  • export the chart as graphic, e.g. SVG (this is a 4.0+ feature) and edit the resulting picture;

  • use Gnumeric to create the chart - Gnumeric allows for modifying the area below a X/Y plot.

4
  • I tried to use area chart type, but, instead of a single line, I got two areas (one for x and one for y). Is there a way around this? Dec 25, 2013 at 19:08
  • Sorry, AFAIK this is the "default" result of an area chart. But i fear that i didn't understand exactly how the desired result should look like. Would it be possible to provide some sample data and to describe how the resulting chart should look like?
    – tohuwawohu
    Dec 29, 2013 at 11:23
  • 2
    Additionally: LO Calc is very good in matters of charts based on spreadsheet data, but to plot a function graph, other software may be more suitable. Geogebra does a great job (as proposed by @falconer).
    – tohuwawohu
    Dec 29, 2013 at 11:26
  • I added a picture in a case when it is easy to fill the area below the curve. Dec 29, 2013 at 14:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .