# Editing the graphic generated by ListDensityPlot

I have generated a graphic using ListDensityPlot in Mathematica, I want to make following three edits to it, but not finding a way. Would be thankful for any advice.

1. How to rotate the graphic. My graphic is triangular in shape, I want to orient it in a fixed direction. How to make a particular corner to be at top, which can be identified with its Cartesian coordinates (say, by (0, 0)) ?

2. I want a fixed range to be shown by the false color scale to represent different colors on graphic. I am not able to do so as irrespective of the range I choose for PlotLegends, the scale shows only the range which is available on graphic. For example if the graphic has area having the plotted variable varying between 0 to 5, no matter what range i choose for PlotLegends->, false color scale only shows the colors representing the values 0-5 only. How to change it ?

3. Instead of leveling the three axes, I want to level the three edges with their coordinates (with no frame). How to achieve it ?

Here is the example for the truncated triangle.

XX1={{0.,0.,2},{0.149508,0.076178,7},{0.153488,0.0498713,7},{0.155716,0.0246631,4},{0.156435,0.,4},{0.302952,0.0984348,7},{0.307539,0.0487095,7},{0.309017,0.,4},{0.444473,0.144418,7},{0.451668,0.0715374,7},{0.453991,0.,4},{0.574342,0.186615,8},{0.584501,0.0925761,7},{0.587786,0.,4},{0.689152,0.223919,8},{0.702713,0.111299,7},{0.707107,0.,4}};
ListContourPlot[XX1,PlotLegends->{0, 1, 2, 3, 4, 5, 6, 7, 8},ColorFunction->"AvocadoColors"]


Will appreciate any help.

• Can you provide the code you are using and some visuals explaining the desired result? Commented Oct 11, 2019 at 1:49
• I have added a small example in the original post. Commented Oct 11, 2019 at 4:16
• Still not clear to me what you are trying to achieve. For 1. and 3. maybe this? ListContourPlot[XX1, PlotLegends -> {0, 1, 2, 3, 4, 5, 6, 7, 8}, ColorFunction -> "AvocadoColors", ScalingFunctions -> {Identity, "Reverse"}, PlotRangePadding -> None] Commented Oct 11, 2019 at 4:29
• Thanks. For point 2, the false color scale is having colors for 2-8. What I want is 0-8, even if there is no points in the list corresponding to 0. Commented Oct 11, 2019 at 4:45

Update

BarLegend inside plot area.

ListContourPlot[XX1,
PlotLegends ->
Placed[BarLegend[{"AvocadoColors", {0, 8}}, LegendLayout -> "Row", LegendMarkerSize -> 200],
{.28, .06}],
ScalingFunctions -> {Identity, "Reverse"}, PlotRangePadding -> None]


For 1.

ScalingFunctions -> {Identity, "Reverse"}


For 2.

PlotLegends -> BarLegend[{"AvocadoColors", {0, 8}}]


For 3.

PlotRangePadding -> None

ListContourPlot[XX1,