Commit 222f4458 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

docs: update 'getting started'

parent 1c621deb
Loading
Loading
Loading
Loading
+23 −15
Original line number Diff line number Diff line
@@ -28,23 +28,18 @@ C API.
Project Status
--------------

**WARNING**: The master branch recently underwent a significant refactoring and the
stability is currently beta/experimental. Maybe not even that. It will take a few
more weeks to stabilize and document everything.
**WARNING**: The stability is currently beta/experimental. Maybe not even that.
It will take a few more weeks to stabilize and document everything.


Getting Started
---------------

Here is how to draw a simple timeseries chart using plotfx:

    $ plotfx --in example_chart.ptx --out example_chart.svg

Output File (`example_chart.svg`):

[![A simple line chart](/examples/linecharts/simple_timeseries.svg)](./examples/linecharts/simple_timeseries.ptx)
Example / Demo
--------------

Input File (`example_chart.ptx`):
Being a highly visual tool, PlotFX is best explained by example. So here is a PlotFX
file that defines a simple timeseries chart (`example_chart.ptx`). Note that this
example is only intended to give you an idea of what the syntax looks like and to
get you started quickly; for an in-depth description of all parameters, please refer
to the documentation.

    width: 1200px;
    height: 280px;
@@ -68,8 +63,20 @@ Input File (`example_chart.ptx`):
      layout: linear(20);
    }

Here is how you can run the above example file through PlotFX:

For more examples, please see [the examples page](https://plotfx.org/examples).
    $ plotfx --in example_chart.ptx --out example_chart.svg

When running the example locally, you can use your own input CSV file, or you
can download the example CSV file [from here](/tests/testdata/measurement.csv).
If everything works, you should get an output file similar to  the one below
(`example_chart.svg`):

[![A simple line chart](/examples/linecharts/simple_timeseries.svg)](./examples/linecharts/simple_timeseries.ptx)

More examples can be found on [the examples page](https://plotfx.org/examples).
For a more detailed introduction to PlotFX, see the [Getting Started](https://plotfx.org/documentation/getting-started) page.
If you have any questions please don't hesitate to reach out via [GitHub issues](https://github.com/plotfx/plotfx).


Building
@@ -100,6 +107,7 @@ from the "Grammar of Graphics" [0] and the ggplot2 project.

[0] Wilkinson, L. (1999). The Grammar of Graphics (Springer)


License
-------

+33 −1
Original line number Diff line number Diff line
@@ -2,6 +2,38 @@ Getting Started
===============

Welcome to PlotFX! This page will guide you through creating a simple first plot
and then give you pointers to more in-depth documentation.
and then give you pointers to more in-depth documentation. If you don't have
PlotFX installed on your machine yet, please take a look at the [Installation](/documentation/installation)
page first.

### The first image

Here is a minimal PlotFX example file that you can save to your machine and run:

    width: 1200px;
    height: 600px;

    lines {
      xs: 10px 40px;
      ys: 20px 400px;
      colors: #06c;
    }

Save the file to `example.ptx` and then run it using command line below:

    plotfx --in example.ptx --out example.svg

If you do that, PlotFX will produce a white 1200x600 pixel image with a blue line:

    [ image ]

It's not the most useful example in the world, but it shows you how to run files
through PlotFX.


### Adding scales


### Adding a title and legend