etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
773 stars 216 forks source link

Unable to invert bars in BarChartFace #688

Open Tassadaar opened 1 year ago

Tassadaar commented 1 year ago

Hello! I am trying to make a bar chart with positive and negative values, where the negative ones are shown as inverted bars (below the x-axis). Is BarChartFace the right choice for my purpose, or should I consider alternatives? Thanks!

I currently have this but x-axis seems to be one and the same with the min value:

values = [0.1, -0.1, 0.2, -0.2, 0.3, -0.3]
labels = ["A", "C", "D", "E", "F", "G"]

face = BarChartFace(
                  values=values,
                  labels=labels,
                  colors=["blue", "blue", "blue", "blue", "blue", "blue"],
                  min_value=-0.5,
                  max_value=0.5
         )