![]() When used with both thin and the -n flag, its meaning becomes more obscure. When used with the -n flag, it takes on a new meaning: "up to category #". The lines option will display the first number of categories, as defined by value, contained in the raster map. Use the lines, thin, use, range, and/or -n options to reduce the number of categories to be displayed, or the -s flag to force a smooth gradient legend. If the user attempts to display a very long legend in a relatively short display frame, the legend may appear in unreadably small text, or even revert to a smooth gradient legend. If this is not the desired result, the -f flag may be used to flip it back. ![]() If the box is defined with inverted y-values or an inverted range, the legend will automatically flip. Horizontal legends will always be smoothed. Raster maps based on floating point values will display smoothed, from greatest to smallest value, while categorical raster maps will display in order, from top to bottom. When using the at to size & place the legend, a user may create a horizontal legend by making the box wider than it is tall. d.legend will only obscure those portions of the active frame that directly underlie the legend. The legend’s default size is based on the dimensions of the active frame, specifically its height. Text encoding (only applicable to TrueType fonts) border_color= nameĮither a standard color name, R:G:B triplet, or "none"ĭ.legend displays a legend for a user-specified raster map or 3D raster map layer in the active frame on the graphics monitor. Use a subset of the map range for the legend (min,max) color= nameĮither a standard color name or R:G:B triplet List of discrete category numbers/values for legend range= min,max Size and placement as percentage of screen coordinates (0,0 is lower left) Specific values to draw ticks label_step= float Number of text labels for smooth gradient legendĭefault: 5 label_values= float Thinning factor (thin=10 gives cats 0,10,20.) Number of text lines (useful for truncating long legends) Keywordsĭ.legend ] ] Flags -vįorce launching GUI dialog Parameters raster= name You can of course do the same in Inkscape, just make sure to select the option to export as svg.Displays a legend for a 2D or 3D raster map in the active frame of the graphics monitor. The one below was done in GIMP in just a few simple steps. r.out.legend -d raster=elevation \Īnd with just a little bit of post processing you can create slightly more fancy (more colour full) histograms. You can also, just like in d.legend, add a histogram distribution, which will be placed left of the bar (if vertical) or above (if horizontal). r.out.legend raster=elevation \ĭimensions=300,20 labelnum=3 fontsize=10 unit="px" \ Note that the default is a transparent background. In this example I have set the background to grey. There are, I should add, some other nice solutions, see for example this Q & A at gis.stackexchange.īelow an example how to use the addon. I originally wrote the script to create smooth legend for use in the map composer of QGIS, because it is no option (yet) to create a smooth legend from within the map composer. For a more interactive way to generate maps, check out ps.map. For detailed explanations of the different options, see the manual pages of these two functions. The script is a wrapper of the functions d.mon and d.legend. Example of an output of the r.out.legend addon Other options are to change the font and font size and the image type (PNG, BMP, PDF and SVG). You just select the raster layer, the dimensions and resolution required and the name of the output image. I just uploaded a small addon for GRASS GIS, r.out.legend, with which you can quickly create a smoothed legend image for floating point raster maps (continuous values as opposed to categories).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |