Looking for Graphite graph templates - graphite

I've searched the net but cannot find any pretty graphite templates that can be placed in graphtemplates.conf and used in the graph by adding ?template=[name] to the query string.
I found the solarized-light template which looks as follows:
[solarized-light]
background = #fdf6e3
foreground = #657b83
majorLine = #073642
minorLine = #586e75
lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False
This one is nice but I want to be able to select more options. Does anyone have or found a good template which I can use?

I couldn't find anything either, so I started one: https://github.com/phillbaker/graphite-templates. Currently has solarized-light (from your post) and solarized-dark. I opened an issue to add monokai as well.

Related

How to make a button refuse giving you a item the second time you click it

So, i was making a roblox game, and i implemented a shop, but i forgot something, the way how to make it give you an item once a time.
My code is this:
local BtoolGiver = script.Parent
local player = game:GetService("Players")
local valid = game.Workspace.SoundGroup.SoundSFX
local invalid = game.Workspace.SoundGroup.Sounding
script.Parent.MouseButton1Click:Connect(function()
valid.Playing = true
local tool = BtoolGiver.F3X:Clone()
tool.Parent = game.Players.LocalPlayer.Backpack
end)
Can you find a way how to fit the code in it?
Thanks!

How to use local images as background with gotty?

It is possible to use local images, I have tried the following ways but none have worked :(
background_image = "url(https://i.ibb.co/DknqgWf/test.png)" // This one works
background_image = "url(~/termux/gotty/wallpapers/wallpaper-1.png)"
background_image = "url(./termux/gotty/wallpapers/wallpaper-1.png)"
background_image = "url(/data/data/com.termux/files/home/termux/gotty/wallpapers/wallpaper-1.png)"
The doc says it's a css property, so it should work but it doesn't :(
version : 1.0.1
SO: Android
how about
background_image = "url(file:///data/data/com.termux/files/home/termux/gotty/wallpapers/wallpaper-1.png)"
maybe only two // wherer I have three /// - but posix should always squash too many / to one.
GL

MigraDoc / PdfSharpCore - Requesting a fontface "New"

table.Rows[0].Cells[4].AddParagraph("0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ")
.Format.Font.ApplyFont(new Font("barcode", 36));
...
var documentRenderer = new DocumentRenderer(_document);
documentRenderer.PrepareDocument(); //<--- crash here
It comes through my custom font resolver ResolveTypeface("barcode", false, false) and GetFont("barcode.ttf") as expected.
It then comes through with ResolveTypeface("New", false, false). I don't know where "New" is coming from.
If I change new Font("barcode", 36) to new Font("Arial", 36) all is well and it never askes for a fontface of "New". I've tried another font, just in case something was messed up there. I've looked through the MigraDoc / PdfSharpCore source but see no reference to a hardcoded "New" string.
My best guess is that MigraDoc to PDF conversion looks up the FontFamily from the font that it used to resolve and then uses that font family (not the original one) when generating the PDF.
This means 2 things:
You better use the exact font family name that is in the font when resolving it.
You font needs to be correct / not corrupted. Somewhere it's grabbing "New" from the font I was using.

How does one use a CDSView with MultiLine on GMAPPlot?

(First Question so apologies)
Bokeh 1.3.4
Situation:
I am trying top map a Bokeh MultiLine using a CDSView and all the existing examples seem to use the "figure" object which has a helper (multi_line) which accepts a view as an argument. I am doing this on top of a GMAPPlot which does not support multi_line (only MultiLine) (see below). The commented out line throws an error saying GMAPPlot does not support multi_line.
plot = GMapPlot(
x_range=Range1d(), y_range=Range1d(), map_options=map_options, sizing_mode='scale_height'
)
.
.
.
sel_sa1s = []
v_bf = [True if sa1_val in sel_sa1s else False for sa1_val in v_source.data['SA1']]
v_view = CDSView(source=v_source, filters=[BooleanFilter(v_bf)])
v_ml = MultiLine(xs="xs",ys="ys",line_color="black", line_width="w")
#v_rend = plot.multi_line(xs="xs",ys="ys",line_color="black", line_width="w", source=v_source, view=v_view)
v_rend = plot.add_glyph(v_source, v_ml, name='votes')
The snippet shown above works and maps the entire network (very crowded) because there is no filter. What I want to have happen is for the filter to be initialised to hide everything then when the user clicks on an area (SA1) it will display the network related to that SA1.
Actually I can do that but only one area at a time and it would be much more efficient to be able to load the whole map and use a filtered view to control which sub-networks are displayed.
It seems that GMAPPlot only likes the pattern:
create glyph
add glyph
So, my question is - how does one use a CDSView in this environment (how does one add it to the renderer?)
Screenshot of unfiltered data set
It seems that GMAPPlot only likes the pattern:
create glyph
add glyph
That has not been true for some time. There is a higher level bokeh.plotting.gmap function that creates and configures GMapPlot instances with deafult axes, etc, and also has all the same methods and conveniences as figure (e.g. multi_line). It will be much less work to go this route than assembling everything by hand from low-level objects.

GlyphVector.getoutline() never returning

I am trying to create a PostScript file using the Apache xml-graphics library. When I run under Java, it works fine.
But when I build for .NET using IKVM, then on a call to GlyphVector.getoutline(x, y), the code never returns.
This is happening when I:
AttributedString as = new AttributedString(buf.toString());
// call as.addAttribute() setting various TextAttribute for various ranges
FontRenderContext frc = graphics.getFontRenderContext();
LineBreakMeasurer lineMeasurer = new LineBreakMeasurer(as.getIterator(), frc);
TextLayout layout = lineMeasurer.nextLayout(Integer.MAX_VALUE);
layout.draw (graphics, left, line.getBaseline());
Any idea what can be going wrong?
thanks - dave

Resources