multible secondary axes

Tutorial for making plot with multible axes (some times reffered as parasites axes or secondary axes)


click to enlarge


In order to start with this tutorial:

  1. Import data to Veusz
  2. Change document witdh and height
    • the point of this is to make the plot a bit wider so all the additional vertical axes fit nicely (for example: width 20cm, height 15cm)
In this example there will be 4 vertical (y) axes and 1 shared horizontal (x) axis. By default, veusz will generate one graph (graph1) with one horizontal x axis and one vertical y axis.

Add more axes


For this example we need to add 3 more vertical (y) axes.
In order to do that, select "Insert" from menu bar and from drop down menu select "Add axis", or simply click on "Add axis" button on the main window:



Repeat previous step as long as you have three new axes:


To rename axes, double-click on the axis name in "Editing - Veusz" window. And rename them, for example "y1"; "y2", "y3", "y4".



Configure axes


Make sure that: x axis direction is horizontal and all the y axes are vertical. If you click on axis widget in "Editing - Veusz" window you can change the direction from "Properties - Veusz" window.


At the moment all the axes are clustered together on the left side of the plot ("Axis position" 0 in the Properites window). Changing the (Axis position) value moves the axis, 1 is the right side and 0,5 is the middle.

Alternatively: Selecting axis widget in the "Editing" window will highliht selected axis in the plot window and you can use the mouse to move it.



Change the "Axis position" value for all y axis so that:
  • y1 = 0
  • y2 = 0,1
  • y3 = 1
  • y4 = 0,9
Result should be something like pictute below. If needed, select "graph1" from Editing window and resize graph area - dragging black square markers in the corner of highlihted graph area.


You might also like to adjust the horizontal x axis. Select x axis widget from Editing window and change Min position to 0,13 and Max position to 0,87. That way horizintal axis will starts after and stops before vertical axes.


Add data points (plots)


Now it's time to start adding data points (plots) to the document.

Select graph1 from Editing windows and from main window menu select Insert > Add xy (or with button marked with arrow below). This command will add "xy1" scatter to your graph, double-click on it to rename it to something that makes more sense, for example "sin".

Select "xy1" widget from Editing window and change the properties from Properties window so that:
  • X data = x
  • Y data = Sin
  • X axis = x
  • Y axis = y1

Add more "xy" scatters, rename them to "cos", "up", and "down", for each xy scatter change properties so that:

 cos
  • X data = x
  • Y data = cos
  • X axis = x
  • Y axis = y2
  up
  • X data = x
  • Y data = lin
  • X axis = x
  • Y axis = y3
  down
  • X data = x
  • Y data = lin2
  • X axis = x
  • Y axis = y4

The result should be similar to:

Now it only needs some formatting to look better. Select widget(axis or xy) from Editing window and change parameters in the Formatting window.




Comments