Question: Is there a non manual way to control the colour ramp in symbology based on value.

In my example below I have values that can be positive or negative, i want everything positive to be one colour and negative the other with values around zero as white.

[![enter image description here](https://i.stack.imgur.com/WxVny.png)](https://i.stack.imgur.com/WxVny.png)

How does QGIS decide where to place the break in colour? Double clicking on the ramp brings me this set of options but the figures at bottom don't correspond to the figures in the source data.

[![enter image description here](https://i.stack.imgur.com/vRP0g.png)](https://i.stack.imgur.com/vRP0g.png)

Answer given by Eric below, screen grab is that applied to my example for those who can't translate the German. This still leaves you with some manual edits to make, for most automated solution see my solution

[![enter image description here](https://i.stack.imgur.com/avaBv.png)](https://i.stack.imgur.com/avaBv.png)

Answer: 
As suggested by @ThingumaBob, I resolved my problem with `ST_ClusterDBSCAN` (postgis 9.3 and above).

So I select the line's ID which are included in the longest subnetwork with:

```
WITH subnetwork AS
(
   SELECT gid, ST_CLUSTERDBSCAN(geom, eps := 0.0, minpoints := 1) OVER () AS sub, ST_LENGTH(geom) AS len
   FROM network
) 
SELECT gid FROM subnetwork
WHERE sub = (SELECT sub FROM (SELECT sub, SUM(len) AS t_len FROM subnetwork GROUP BY sub ORDER BY t_len DESC LIMIT 1) AS temp)

```
The [documentation](https://www.postgresql.org/docs/current/static/queries-with.html#QUERIES-WITH-SELECT) says:

> 
> When working with recursive queries it is important to be sure that the recursive part of the query will eventually return no tuples, or else the query will loop indefinitely. Sometimes, using UNION instead of UNION ALL can accomplish this by discarding rows that duplicate previous output rows.
> 
> 
> 

In this case, the entire rows are indeed identical, so you can simply use UNION:

```
WITH RECURSIVE connected_line AS (
  SELECT a.ID,a.geom FROM network a WHERE ID = 1
  UNION                                                 -- no ALL
  SELECT b.ID,b.geom FROM network b, connected_line c
  WHERE st_intersects(b.geom, c.geom)
  AND NOT b.ID = c.ID
)
SELECT ID FROM connected_line;

```