#13827: Allow more customization in GraphPlot
--------------------------------+----------------------------------
Reporter: ppurka | Owner: jason, ncohen, rlm
Type: enhancement | Status: new
Priority: major | Milestone: sage-wishlist
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------+----------------------------------
Changes (by jmantysalo):
* milestone: sage-6.4 => sage-wishlist
Old description:
> There is no customization of text possible in plots of graphs (graphs as
> in graph theory). It is mentioned as a TODO in
> `sage.graphs.graph_plot.GraphPlot.set_vertices`
> {{{
> # TODO: allow text options
> for v in self._nodelist:
> self._plot_components['vertex_labels'].append(text(str(v),
> self._pos[v], rgbcolor=(0,0,0), zorder=8))
> }}}
New description:
This is my suggestion of problems and possible enhancements of graph
plotting:
- For now we say either `vertex_colors='red'` or `vertex_colors={'red':
[1], 'blue': [2, 3]}`. But contrary to this we have `edge_color` and
`edge_colors`. Not good.
- Default vertex color is pink. Setting color of some vertices will change
color for other vertices to light blue. Not good.
- `fontsize` affects to size of title font, not for vertex label or edge
label font sizes.
- We have no way at all to change, say, fontsize of vertex labels or color
of edge labels etc.
- And why we can have different colors in vertices, but not shapes etc?
**Suggestions**
- Make pink true default color for vertices, so that setting color of
vertex 1 will left vertex 2 to pink.
- Add option `vertex_color` that will be default color for vertices not
colored with `vertex_colors`. Deprecate use of `vertex_colors='red'`.
- Allow using `edge_color` and `edge_colors` at same time like
`edge_color='red', edge_colors={'blue': [(1, 2)]}`. (For now setting
`edge_colors` will change color of other edges to black, overriding
`edge_color`.)
- Add `title_fontsize`. Deprecate `fontsize`.
- Add other options with same pattern. I.e. let we still have
`vertex_shape`, but also add `vertex_shapes` to be used like
`G.plot(vertex_shape='s', vertex_shapes={'d': G.sources(), 'c':
G.sinks()})`.
- And last, we should decide how to give options for fonts. As a triples
of color, font and fontsize, or as a three argument? If as triples, do not
add `title_fontsize` but `title_font`.
First action point would be to think about my suggestion and modify it
until we have common vision of what to do.
Above is a copy from dicussion, to be found easily. Here is original
description:
There is no customization of text possible in plots of graphs (graphs as
in graph theory). It is mentioned as a TODO in
`sage.graphs.graph_plot.GraphPlot.set_vertices`
{{{
# TODO: allow text options
for v in self._nodelist:
self._plot_components['vertex_labels'].append(text(str(v),
self._pos[v], rgbcolor=(0,0,0), zorder=8))
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/13827#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.