Giter Club home page Giter Club logo

Comments (2)

cphalpert avatar cphalpert commented on September 28, 2024 1

Thanks for the suggestion! Here's a solution that you can use until we think of a better long term option:

import chartify

# Generate example data
data = chartify.examples.example_data()

average_price_by_fruit_and_country = (data.groupby(
    ['fruit', 'country'])['total_price'].mean().reset_index())

ch = (chartify.Chart(
    blank_labels=True,
    x_axis_type='categorical',
    y_axis_type='categorical')
 .plot.heatmap(
    data_frame=average_price_by_fruit_and_country,
    x_column='fruit',
    y_column='country',
    color_column='total_price',
    text_column='total_price',
    text_color='white')
)
# Get the current order
xaxis_order = ch.axes.xaxis_factors

# Manipulate the order here
xaxis_order = xaxis_order[::-1]

# Set the order
ch.axes.set_xaxis_factors(xaxis_order)
ch.show()

from chartify.

vadymhimself avatar vadymhimself commented on September 28, 2024

@cphalpert thank you! Very useful workaround!

from chartify.

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.