DataPlotly Standaard gebruik

De DataPlotly interface is ontworpen om simpel te zijn, maar tegelijk compleet met veel beschikbare opties en aanpassingen.

Creating a plot is just easy as it sounds: choose the plot type, x and y columns, colors, labels, etc and press the Create Plot button. The plot is immediately shown in the plot canvas.

If you want to change some setting, e.g. the marker color or size, the x column, go ahead and the hit the Update Plot button: the plot is then updated in the plot canvas.

image

Voeg een diagram toe

De DataPlotly workflow is vrij eenvoudig:

  1. kies het type diagram (1)

  2. stel de laag en bijbehorende veld(en) in die je wilt tonen (2)

  3. show the plot with the Create Plot button (3). The plot canvas is automatically visible.

image

You can change some plot settings and click on the Update button to update the plot with the changes.

If you want to start again, just click the Clean Plot Canvas button and the plot canvas will be empty.

Meervoudig diagram

DataPlotly maakt het mogelijk vele verschillende diagrammen te maken. Diagrammen kunnen worden getoond op hetzelfde diagramvenster (overlappend) of ieder diagram kan in aparte rijen of kolommen worden getoond (subdiagrammen).

Overlappende diagrammen

Je kunt zo veel diagrammen toevoegen aan het diagramvenster als je wilt. Diagramtypes kunnen verschillend zijn en ook de bron laag kan verschillen.

[!NOTE] results can be very strange depending on the plot type and on the fields you choose. Be careful!

To add other plot just repeat the steps of add_plot by choosing different plot types and/or just different layer fields, etc..

In de volgende afbeelding, hetzelfde diagramtype (spreidingsdiagram) en verschillende velden uit dezelfde laag:

image

De volgende afbeelding toont 2 verschillende overlappende diagramtypes (boxplot en spreidingsdiagram):

image

Subdiagrammen

Je kunt ervoor kiezen om de diagrammen te scheiden in aparte diagramvensters. Dit kan vooral nuttig zijn wanneer de schalen sterk afwijken of wanneer teveel overlappende data zorgt voor een onoverzichtelijk diagramvenster.

You just have to choose the plots and the fields as described in the section add_plot but you have to specify the SubPlots parameter from the combobox and choose if the plots have to be drawn in rows (default parameter) or in columns.

De volgende afbeeldingen tonen diagrammen in rijen en in kolommen:

image

|

image

Diagram opslaan

Saving a plot, technically the plot canvas, is very simple. You can choose to save the plot as a png image or as html file.

[!NOTE] Saving the image as html file will keep the interactivity of the plot. The html file relies on the local DataPlotly installation, and cannot in general be used on other systems.

Klik op de juiste knop en kies de locatie waar het diagram moet worden opgeslagen, zowel statisch als interactief.

image

Ruwe diagramcode

In addition to saving the plot as image or html file (see save) you can also copy the raw html code of the plot and embed it somewhere else.

Een goede plek om de ruwe code te knippen en plakken is het html frame van de printvormgeving van QGIS.

In order to copy the plot code, after the plot creation, just go in the Raw Plot tab: here you can see a long string. Right Click on the tab and choose Select All, then Right Click again and choose Copy (of course you can use keyboard shortcuts Ctrl + A for select all and Ctrl + C for copy):

image

Nu is de broncode van het diagram gekopiëerd in het klembord: je hoeft nu alleen nog maar te kiezen waar je het wilt plakken

In the following example, the html code is pasted in the html frame of the print composer:

  1. open the print composer and add an html frame (1)

  2. paste the code in the Source space (2)

  3. refresh the html code (3)

  4. de resultaten worden getoond in het frame (4)

image

Tips voor velden

Het gebruik van expressies

DataPlotly ondersteunt alle veldtypen(integers,floats,text,etc..) en zal voortbouwen op de data zodat deze correct kan worden getoond.

Thanks to the QGIS API and custom widget, it is possible to add also Expressions instead of pure layer fields (e.g. field + 10, field1 * field2, etc).

You can use the Expression editor to add complex expressions (e.g. (field1 + 10) * (field2 * 10)) or you can type the expression directly in the combo box. Expressions are evaluated on the fly, so if the string is red, then the expression is not valid.

image

Gebruik alleen geselecteerde objecten

Een andere handige optie is het alleen werken met geselecteerde objecten in een laag.

Just check the Use only selected features check box and only the attributes of the selected features will be taken.