Is there a way to specify a colour scheme for GraphViz dots in Doxygen? - doxygen

The default scheme isn't very bright and dots has different schemes that can be set when making graphs from the command-line. Doxygen exposes DOT_FONTNAME to pass a font argument to dots but doesn't seem to have that for the color scheme? Does anyone know if there is a custom tag to set that, or a way to set a default scheme on GraphViz?

You can use the Brewer colour schemes to define a "palette" of colours from which you can choose one with an index (1, 2, 3, ...).
When you want to change the palette, you just have to change the default colour scheme for nodes (or edge, or graph), the actual display colour of all nodes in the graph will then be updated accordingly.
This example uses colour scheme set39:
digraph {
node [colorscheme=set39];
node [shape=rectangle, style="filled", fillcolor=1]
a
node [shape=ellipse, style="filled", fillcolor=4]
b
a -> b
}
By changing only the colorscheme property of the first node element (the "default"), you can change the colour of all nodes:
digraph {
node [colorscheme=spectral10];
node [shape=rectangle, style="filled", fillcolor=1]
a
node [shape=ellipse, style="filled", fillcolor=4]
b
a -> b
}

Related

Altair Scatter Chart

i am looking for a way to make a point chart based on multiple nominal conditions. i am plotting 2 values on x and y, but i would like to differentiate these points based on year as well as 'type'.
currently, the way i do it is to assign year to color while 'type' is assigned to shape
color=alt.condition(selection, alt.Color('Date:T'), alt.value('lightgray'), scheme='red' )
shape = alt.Shape('type:N')
a few questions:
is it possible to change the color scheme of the points instead of the default colors to say shades of red/blue/black, etc?
is it possible to assign one color scheme/shade (instead of shapes) to 'types'?
is it possible to change the color scheme of the points instead of the default colors to say shades of red/blue/black, etc?
Yes, see https://altair-viz.github.io/user_guide/customization.html#customizing-colors. You can use any of the built-in Vega color schemes, or define your own using the methods discussed there. From your example, it might look something like this:
color=alt.condition(
selection,
alt.Color('Date:T', scale=alt.Scale(scheme='reds')),
alt.value('lightgray')
)
is it possible to assign one color scheme/shade (instead of shapes) to 'types'?
No, there is no built-in way to apply two color scales based on two fields in the data (how would a mark choose between the two colors assigned to it?) One possible approach would be to use an opacity encoding for the second field, which is reflected in the lightness of the marks. For your example, it might look like this:
opacity='type:N'

Question about mglfillelayer and MGLLineStyleLayer

In mapbox_ios:
1. About MGLFillStyleLayer and MGLLineStyleLayer, how to set different styles (color, width, dotted line) for individual features.
A scene: if it is a separate polyhedron with no connection between the two surfaces in different places, but it is a feature, if I want to add more polyhedron to modify the graph (add a point and connect the two sides), how to modify the graph?
Hope to get help, thank you!
To answer your first question, you can style individual features within a style layer based on feature attributes.
Get started by adding the layers to your map. You could create your source, then style the layer's color based on the value in the feature attributes. Use the lineColor property for your MGLLineStyleLayer and fillColor to change the color of your MGLFillStyleLayer.
For example:
let layer = MGLLineStyleLayer(identifier: "layer", source: source)
layer.lineColor = NSExpression(forKeyPath: "color")
style.addLayer(layer)
You can also create a dictionary with possible attribute values and the color you would like to use as values. This example shows that approach by using icon images.

Way to fast change color for group of clusters in Gephi

After running the cluster algorithm I prefer to set the colors of my own choice.
And I want to highlight only most important clusters. In Partitionig -> Nodes -> Clustering (Chinese Whispers) is a convenient option "All Blacks". But I'm using a black background. Maybe somebody knows where change (in config files or something like that, I don't know exactly) that all nodes will become whites after pressing "All Blacks"?
Or maybe you know a better way to group them and set color.
Now I am using filter portion -> Clustering (Chinese Whispers) -> set clusters -> go to data lab -> create column color and set to white.
But it is not very convenient.
Thank you!
You can use the Partition tab in Gephi. Check the slides here p. 38-40. you can then modify the colours for each partition by right-clicking on each partition color

How to lighten up colors of syntax highlighting?

I need to make syntax colors lighter (for dark themes). Globaly or not.
Yes, in fact there is a dimmer switch that affects all faces. There are in fact several such dimmer switches: (1) to dim/brighten, (2) to heighten colors or make them more washed-out, (3) to move toward or away from a particular hue, or (4, 5, 6) to make them all more - or less - red, blue, or green.
All of these dimmer switches that act on all faces together are rolled into a single command -- well two commands: one for the face backgrounds (doremi-all-faces-bg+) and one for the face foregrounds (doremi-all-faces-fg+).
These are two of several Do Re Mi color incrementer commands. The others work on individual faces or on frame backgrounds and foregrounds. All of these commands work the same way. After invoking the command (e.g. M-x doremi-all-faces-bg+):
You are prompted for the color COMPONENT to increment/decrement (a character):
`r` - red
`g` - green
`b` - blue
`h` - hue (basic color)
`s` - saturation (purity)
`v` - value (brightness)
`R` - red, green, and blue, at the same time
`H` - hue, saturation, and value, at the same time
`R` and `H` increment all components of the respective color spaces,
according to the value of INCREMENT.
You can at any time change, to increment/decrement a different color
component (r, g, b, h, s, v, R, or H). For example, you can type `r`
and use the arrow keys or mouse wheel to change the red component,
then type `b` and use the arrows or wheel to change the blue
component, and so on, all in the same call.
For desaturating, that is, to render all colors more pale or washed-out, you just use s.
See Angry Fruit Salad for more information about this synchronized saturation dimming of all faces.
You can use the dimmer switch whenever you want, if you want more or less washed out colors. Or you can use it to find a good combination and then save the current face values in your custom-file (or your init file, if you do not have a custom-file, which you should have).
More likely, you will want to experiment by "dimming" and then follow that up with some customization of a few individual faces. For that, you can use the similar dimmer switches for individual faces (doremi-face-bg+ etc.). Incrementing qualities of all faces at once is a bit rough-and-ready. But for something like desaturating, it is very quick and does the job well.
Note that the face changes made using Do Re Mi commands are not saved automatically. User option doremi-customization-status controls how Customize views such changes.
By default, Customize sees them as if you had made them using the Customize UI. In this case, you can use command customize-unsaved to open Customize for them all, where you can save individual changes or all of the together.
If you set option doremi-customization-status to value outside then Customize sees the changes instead as having been made outside Customize. In this case, you can use command customize-rogue to open Customize for them all.
If you set the option to anything else then Customize ignores the changes altogether - you cannot use Customize to save them until you reapply them using Customize itself or a command such as set-face-foreground. This option setting can be useful if you just want to experiment and do not want Customize to see what you do.

Is it possible to customize the displayValue color individually in fusioncharts?

I am using the 3D Bar chart in FusionCharts. I have displayValues set to display numeric and textual values above the top of the bars. What I would like to be able to do is set the color of individual displayValues differently, for example, if the year-over-year change is positive, color the displayValue for just that bar to green, if it is negative, color it red, etc. Is this possible?
There is no direct way of coloring data plots or data values based on its value. But FusionCharts has an extensive API used to configure Annotations. You can use this API to create texts (data values). Just a rough thought came into my mind.