Git Product home page Git Product logo

Comments (1)

chrieke avatar chrieke commented on May 16, 2024

Hi @orijitghosh, thank you for the question! You can change the color scheme via the draw_settings parameter of the Plot class.

from prettymapp.settings import STYLES
print(STYLES["Peach"])

would be

{'urban': {'cmap': ['#FFC857', '#E9724C', '#C5283D'],
  'ec': '#2F3737',
  'lw': 0.5,
  'zorder': 4},
 'water': {'fc': '#a1e3ff',
  'ec': '#85c9e6',
  'hatch': 'ooo...',
  'hatch_c': '#2F3737',
  'lw': 1,
  'zorder': 1},
 'grassland': {'fc': '#D0F1BF', 'ec': '#2F3737', 'lw': 1, 'zorder': 2},
 'woodland': {'fc': '#64B96A', 'ec': '#2F3737', 'lw': 1, 'zorder': 2},
 'streets': {'fc': '#2F3737', 'zorder': 3},
 'other': {'fc': '#F2F4CB', 'ec': '#2F3737', 'lw': 1, 'zorder': 3}}

Then you can switch out colors here. In the end feed it back to the Plot class like in the example

customized_draw_settings_dictionary = STYLES["Peach"].copy()
customized_draw_settings_dictionary["water"]["fc"] = '#64B96A'
fig = Plot(
    df=df,
    aoi_bounds=aoi.bounds,
    draw_settings=customized_draw_settings_dictionary
).plot_all()

from prettymapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.