Giter Site home page Giter Site logo

Comments (6)

ondovb avatar ondovb commented on August 18, 2024

It's a little roundabout, but you can attach the gradient to a dummy attribute (e.g. "color") and use that to directly specify hues like so:

<attributes ...>
	...
	<attribute>color</attribute>
</attributes>
<color attribute="color" valueStart="0" valueEnd="360" hueStart="0" hueEnd="360" default="true"></color>
...
	<node ...>
		...
		<color><val>60</val><val>120</val></color>
	</node>

from krona.

DWgit avatar DWgit commented on August 18, 2024

Makes sense, thanks very much.

Is there any way to place the category labels into the gradient legend?

Best regards

from krona.

ondovb avatar ondovb commented on August 18, 2024

Not at the moment, but this would be useful.

from krona.

caravinden avatar caravinden commented on August 18, 2024

This query intention to get clarification on coloring part. I need to give some custom color to the application. May I know the best way of doing it and my color hue in like hueStopHsl = ['rgb(255,204,204)','rgb(255,153,153)', 'rgb(179,0,0)'];

from krona.

Artur0901 avatar Artur0901 commented on August 18, 2024

It's a little roundabout, but you can attach the gradient to a dummy attribute (e.g. "color") and use that to directly specify hues like.......

Unfortunately, I can't do it. Could you explain where I have to put it? I will be very grateful.

Best regards!

from krona.

KewinOgink avatar KewinOgink commented on August 18, 2024

The 2011 Ondov et al. BMC Bioinformatics paper says, For categorical variables, users may define the color of every node in the XML, but it's not clear how to express that in the xml file.

The Krona 2.0 XML Specification describes color gradients but there's no mention of discrete colors for categorical attributes.

Thanks very much for any info.

Hello, I was wondering if this has been fixed.
Currently I have a text file (see below) that gives me a nice figure, but I want to add coloring based on categorical variables (ie phenotypes, in this case gram+ gram-).
Does anyone have tips how to convert this text file to the xml format? I can do python and R, but am new to xml parsing.

Gram+ cellular organisms Bacteria PVC group Planctomycetes Planctomycetia Planctomycetales Planctomycetaceae Rubinisphaera Rubinisphaera brasiliensis
Gram- cellular organisms Bacteria Terrabacteria group Cyanobacteria/Melainabacteria group Cyanobacteria Synechococcales Merismopediaceae Synechocystis unclassified Synechocystis Synechocystis sp.
Gram+ cellular organisms Bacteria Terrabacteria group Actinobacteria Actinobacteria Actinopolysporales Actinopolysporaceae Actinopolyspora Actinopolyspora halophila
Gram- cellular organisms Bacteria Terrabacteria group Firmicutes Clostridia Halanaerobiales Halanaerobiaceae Halanaerobium Halanaerobium praevalens

Thanks,

Kewin

from krona.

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.