{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Standalone Field class\n\nThe :any:`Field` class of GSTools can be used to plot arbitrary data in nD.\n\nIn the following example we will produce 10000 random points in 4D with\nrandom values and plot them.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\n\nimport gstools as gs\n\nrng = np.random.RandomState(19970221)\nx0 = rng.rand(10000) * 100.0\nx1 = rng.rand(10000) * 100.0\nx2 = rng.rand(10000) * 100.0\nx3 = rng.rand(10000) * 100.0\nvalues = rng.rand(10000) * 100.0"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Only thing needed to instantiate the Field is the dimension.\n\nAfterwards we can call the instance like all other Fields\n(:any:`SRF`, :any:`Krige` or :any:`CondSRF`), but with an additional field.\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "plotter = gs.field.Field(dim=4)\nplotter(pos=(x0, x1, x2, x3), field=values)\nplotter.plot()"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.8.6"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}