mapsf icon indicating copy to clipboard operation
mapsf copied to clipboard

horizontal legend

Open sylvaine31 opened this issue 4 years ago • 1 comments

Hi, I enjoy mapsf, but I often miss the possibility to put an horizontal legend, especially for chloropeths.

sylvaine31 avatar May 18 '21 08:05 sylvaine31

Hi,

Thanks for having such a good pkg. But I am wondering how to change the sample map and input a new map such as London or Manchester? many thanks,

WarmlyWilson avatar Jun 08 '21 15:06 WarmlyWilson

Bonjour,

merci pour votre package qui est très pratique pour créer des cartes. L'organisation dans laquelle je travaille dispose d'une charte graphique où pour les analyses choroplethes on doit faire une légende horizontale. Serait-ce possible que vous développiez cette option dans votre package ?

merci, cordialement,

samuel

samueltriviere avatar Feb 01 '23 09:02 samueltriviere

Bonjour, Cette fonctionnalité est prévue pour une prochaine version. T.

rCarto avatar Feb 03 '23 07:02 rCarto

This feature is planned for a future version of the package.

rCarto avatar Feb 03 '23 07:02 rCarto

Bonjour, Cette fonctionnalité est prévue pour une prochaine version. T.

Bonjour,

super,

merci pour votre retour,

samuel

samueltriviere avatar Feb 03 '23 08:02 samueltriviere

Bonjour,

toujours sur la légende, je n'arrive pas à avoir un fond blanc opaque avec bg="white" dans mf_legend alors que ça marche très bien dans mf_credits.

image

merci à vous,

samuel

samueltriviere avatar Feb 10 '23 10:02 samueltriviere

Bonjour,

Il me serait plus facile de vous répondre avec un exemple reproductible (ou reprex, voir https://thinkr.fr/reprex-ou-comment-demander-de-laide-efficacement/).

Pour vous répondre, le problème n’apparaît pas avec ma machine :

library(mapsf)
m <- mf_get_mtq()
bks <- mf_get_breaks(m$MED, nbreaks = 8, breaks = "quantile")
mf_map(m, 'MED', "choro",
       breaks = bks, 
       pal = "Viridis", 
       leg_pos = NA)
mf_legend(type = "choro", 
          title = "Very very long title to make the legend overlap the map",
          pos = "topleft", 
          val = bks, 
          pal = "Viridis", 
          frame = TRUE, 
          bg = "white")

Created on 2023-02-10 with reprex v2.0.2

Je pense qu'il s'agit plutôt d'un problème d'ordre de superposition des couches. La légende est elle bien appelée après mf_map(..., type = "choro", leg_pos = NA)?

rCarto avatar Feb 10 '23 11:02 rCarto

Bonjour,

c'est bien ça, j'ai mis mf_legend à la fin, juste avant mf_credits et c'est parfait

merci encore

[image: image.png]

Le ven. 10 févr. 2023 à 12:35, Timothée Giraud @.***> a écrit :

Bonjour,

Il me serait plus facile de vous répondre avec un exemple reproductible (ou reprex, voir https://thinkr.fr/reprex-ou-comment-demander-de-laide-efficacement/).

Pour vous répondre, le problème n’apparaît pas avec ma machine :

library(mapsf) m <- mf_get_mtq() bks <- mf_get_breaks(m$MED, nbreaks = 8, breaks = "quantile")

mf_map(m, 'MED', "choro",

   breaks = bks,

   pal = "Viridis",

   leg_pos = NA)

mf_legend(type = "choro",

      title = "Very very long title to make the legend overlap the map",

      pos = "topleft",

      val = bks,

      pal = "Viridis",

      frame = TRUE,

      bg = "white")

https://camo.githubusercontent.com/73739d82c9c70a893f3a9f6aad143ea5bc9300af0efc1c8b5fe88e6116b5ab4f/68747470733a2f2f692e696d6775722e636f6d2f62454252524e662e706e67

Created on 2023-02-10 with reprex v2.0.2 https://reprex.tidyverse.org

Je pense qu'il s'agit plutôt d'un problème d'ordre de superposition des couches. La légende est elle bien appelée après mf_map(..., type = "choro", leg_pos = NA)?

— Reply to this email directly, view it on GitHub https://github.com/riatelab/mapsf/issues/19#issuecomment-1425675988, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5TERJDTLTOQFK35MUHGE2LWWYRY3ANCNFSM45CBVZNA . You are receiving this because you commented.Message ID: @.***>

samueltriviere avatar Feb 10 '23 12:02 samueltriviere