[GRASS-user] logarithmic scale in raster legend

Hi list!

I have these raster maps of chlorophyll concentration (mg/m3) with a lot of very small values (from 0.02 to 1.5) and few high values (between 20 and 100)… I managed to create my own color table to get a good visualization of the variation… but when I display the legend, i loose the color variation in smaller values…

Is it possible to create a logarithmic legend or at least determine which tick-marks I’m interested in?? I’ve tried with “use” parameter in d.legend (which seemed to meet my needs) setting it to: 0.01,0.1,1,10,100, but works only for categories… There’s no such a thing in ps.map, either… which would be the right approach? any ideas?

Thanks much in advance!
Best,

Vero

What if you use r.mapcalc and apply log to your map to make a new one with rescaled values?

On Jun 9, 2014 12:36 PM, “Veronica Andreo” <veroandreo@gmail.com> wrote:

Hi list!

I have these raster maps of chlorophyll concentration (mg/m3) with a lot of very small values (from 0.02 to 1.5) and few high values (between 20 and 100)… I managed to create my own color table to get a good visualization of the variation… but when I display the legend, i loose the color variation in smaller values…

Is it possible to create a logarithmic legend or at least determine which tick-marks I’m interested in?? I’ve tried with “use” parameter in d.legend (which seemed to meet my needs) setting it to: 0.01,0.1,1,10,100, but works only for categories… There’s no such a thing in ps.map, either… which would be the right approach? any ideas?

Thanks much in advance!
Best,

Vero


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Yeah, I also tried that, and of course, I get a nice gradient in the legend, but then I need to somehow edit tick-marks.
Logarithm of chlorophyll concentration is, from my point of view, uninformative. I need the actual values.
I just want to change the display of the legend, like making log of x or y axis in a plot, that you do not change the
values themselves, just rescale the axis for better visualization… but maybe not (yet) possible in GRASS :wink:

Thanks much!
Vero

···

2014-06-10 7:40 GMT-03:00 Daniel Victoria <daniel.victoria@gmail.com>:

What if you use r.mapcalc and apply log to your map to make a new one with rescaled values?

On Jun 9, 2014 12:36 PM, “Veronica Andreo” <veroandreo@gmail.com> wrote:

Hi list!

I have these raster maps of chlorophyll concentration (mg/m3) with a lot of very small values (from 0.02 to 1.5) and few high values (between 20 and 100)… I managed to create my own color table to get a good visualization of the variation… but when I display the legend, i loose the color variation in smaller values…

Is it possible to create a logarithmic legend or at least determine which tick-marks I’m interested in?? I’ve tried with “use” parameter in d.legend (which seemed to meet my needs) setting it to: 0.01,0.1,1,10,100, but works only for categories… There’s no such a thing in ps.map, either… which would be the right approach? any ideas?

Thanks much in advance!
Best,

Vero


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

You are correct. Then I have no idea how to do this…

···

On Tue, Jun 10, 2014 at 9:32 AM, Veronica Andreo <veroandreo@gmail.com> wrote:

Yeah, I also tried that, and of course, I get a nice gradient in the legend, but then I need to somehow edit tick-marks.
Logarithm of chlorophyll concentration is, from my point of view, uninformative. I need the actual values.
I just want to change the display of the legend, like making log of x or y axis in a plot, that you do not change the
values themselves, just rescale the axis for better visualization… but maybe not (yet) possible in GRASS :wink:

Thanks much!
Vero

2014-06-10 7:40 GMT-03:00 Daniel Victoria <daniel.victoria@gmail.com>:

What if you use r.mapcalc and apply log to your map to make a new one with rescaled values?

On Jun 9, 2014 12:36 PM, “Veronica Andreo” <veroandreo@gmail.com> wrote:

Hi list!

I have these raster maps of chlorophyll concentration (mg/m3) with a lot of very small values (from 0.02 to 1.5) and few high values (between 20 and 100)… I managed to create my own color table to get a good visualization of the variation… but when I display the legend, i loose the color variation in smaller values…

Is it possible to create a logarithmic legend or at least determine which tick-marks I’m interested in?? I’ve tried with “use” parameter in d.legend (which seemed to meet my needs) setting it to: 0.01,0.1,1,10,100, but works only for categories… There’s no such a thing in ps.map, either… which would be the right approach? any ideas?

Thanks much in advance!
Best,

Vero


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Have you tried using the echo command to pipe variables and characters to d.text for user defined labels and ticks? It takes some work with the at=x,y coords to get the legend, labels and ticks where you want them.

echo “message” | d.text size=3 at=37,25 color=orange

To erase map elements or labels, you can echo dummy characters the same color as the background:

echo “##########” | d.text -b size=5 at=18,6 color=white

You may also want to use a graphics tool (e.g, ImageMagick, convert)
to do various graphics conversions on the maps.

L. Prevett

···

On Mon, Jun 9, 2014 at 8:36 AM, Veronica Andreo <veroandreo@gmail.com> wrote:

Hi list!

I have these raster maps of chlorophyll concentration (mg/m3) with a lot of very small values (from 0.02 to 1.5) and few high values (between 20 and 100)… I managed to create my own color table to get a good visualization of the variation… but when I display the legend, i loose the color variation in smaller values…

Is it possible to create a logarithmic legend or at least determine which tick-marks I’m interested in?? I’ve tried with “use” parameter in d.legend (which seemed to meet my needs) setting it to: 0.01,0.1,1,10,100, but works only for categories… There’s no such a thing in ps.map, either… which would be the right approach? any ideas?

Thanks much in advance!
Best,

Vero


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi :slight_smile:

···

2014-06-13 14:23 GMT-03:00 L. Prevett <prevettl@gmail.com>:

Have you tried using the echo command to pipe variables and characters to d.text for user defined labels and ticks? It takes some work with the at=x,y coords to get the legend, labels and ticks where you want them.

echo “message” | d.text size=3 at=37,25 color=orange

Nope, this I haven’t tried… i did it just now, and it seems it doesn’t work with echo, but as:

d.text text=“bla” at=30,30 size=6 color=red

I’d wish there was a flag or button for this task :-/

Thanks for the tips!

Best,
Vero

On Mon, Jun 9, 2014 at 8:36 AM, Veronica Andreo <veroandreo@gmail.com> wrote:

Hi list!

I have these raster maps of chlorophyll concentration (mg/m3) with a lot of very small values (from 0.02 to 1.5) and few high values (between 20 and 100)… I managed to create my own color table to get a good visualization of the variation… but when I display the legend, i loose the color variation in smaller values…

Is it possible to create a logarithmic legend or at least determine which tick-marks I’m interested in?? I’ve tried with “use” parameter in d.legend (which seemed to meet my needs) setting it to: 0.01,0.1,1,10,100, but works only for categories… There’s no such a thing in ps.map, either… which would be the right approach? any ideas?

Thanks much in advance!
Best,

Vero


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user