Description Usage Arguments Value Examples

View source: R/ggplotHeatmap.R

Visualization of the multi-objective gradient landscape by means of
a heatmap and on the basis of the `ggplot2`

-package.

1 2 |

`df` |
[ |

`log.scale` |
[ |

`impute.zero` |
[ |

`minimalistic.image` |
[ |

`color.palette` |
[ |

`legend.position` |
[ |

`...` |
[any] |

[`ggplot`

]

A `ggplot`

object displaying the multi-objective gradient landscape.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# Define two single-objective test problems and a grid of points:
fn1 = function(x) sum((x - c(0.2, 1))^2)
fn2 = function(x) sum((x - c(0.5, 0.5))^2)
points = as.matrix(expand.grid(x1 = seq(0, 0.7, 0.005), x2 = seq(0, 1.25, 0.005)))
# Compute the corresponding gradients and the cumulated path lengths:
gradients = computeGradientField(points, fn1, fn2)
x = computeCumulatedPathLengths(points, gradients)
# Finally, we can visualize the resulting multi-objective "landscape":
ggplotHeatmap(x)
# If one is only interested in the image itself, but not in any labels, legends, etc.
# one should set minimalistic.image = TRUE:
ggplotHeatmap(x, minimalistic.image = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.