Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSun, 27 Mar 2016 13:43:25 +0200Graphing x vs y but colouring points based on 3rd valuehttps://ask.libreoffice.org/en/question/61749/graphing-x-vs-y-but-colouring-points-based-on-3rd-value/Hi,
I have three columns ( x, y and z). I want to create a graph of x versus y. I want all points with a non-zero value for z to appear red and all points with a zero value for z to appear blue. How would I accomplish this?
Thanks. Tue, 08 Dec 2015 23:46:49 +0100https://ask.libreoffice.org/en/question/61749/graphing-x-vs-y-but-colouring-points-based-on-3rd-value/Answer by Regina for <p>Hi,
I have three columns ( x, y and z). I want to create a graph of x versus y. I want all points with a non-zero value for z to appear red and all points with a zero value for z to appear blue. How would I accomplish this?
Thanks. </p>
https://ask.libreoffice.org/en/question/61749/graphing-x-vs-y-but-colouring-points-based-on-3rd-value/?answer=61778#post-id-61778There exists no direct way to make the color of a chart point depend on the value. You can likely get the task done by a makro, or you generate two helper data series, one for "zero" and one for "non-zero" and display them instead of the original ones. Wed, 09 Dec 2015 20:49:41 +0100https://ask.libreoffice.org/en/question/61749/graphing-x-vs-y-but-colouring-points-based-on-3rd-value/?answer=61778#post-id-61778Answer by oweng for <p>Hi,
I have three columns ( x, y and z). I want to create a graph of x versus y. I want all points with a non-zero value for z to appear red and all points with a zero value for z to appear blue. How would I accomplish this?
Thanks. </p>
https://ask.libreoffice.org/en/question/61749/graphing-x-vs-y-but-colouring-points-based-on-3rd-value/?answer=67362#post-id-67362This can be accomplished by a simple re-organising of the data. The `z` column is essentially the category label. First sort the data based on the `z` column. For clarity, consider move the corresponding `x` and `y` value pairs, for all non-zero `z` labels, to a new set of columns.[1] This should result in:
Zero Non-zero
z0, x0, y0 z1, x1, y1
Use an *XY (Scatter)* chart type with `x0`,`y0` as the first data series and `x1`,`y1` as the second data series. The series will automatically use different symbols and colours.
[1] The downside of doing this is related to data point label display i.e., there are two (`z`) columns. If this is important perhaps use a range of row to represent each series.Sun, 27 Mar 2016 13:43:25 +0200https://ask.libreoffice.org/en/question/61749/graphing-x-vs-y-but-colouring-points-based-on-3rd-value/?answer=67362#post-id-67362