Set histogram ticks/label using Syntax - data-visualization

Let me preface this by saying that I am a programmer by trade, but not very familiar with SPSS.
I am helping a friend set up some histogram plots using SPSS Syntax language. Using the Chart Builder, we have arrived at the code below:
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=OurVariable MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE
TEMPLATE=[
"C:\some\path\greenHistogram.sgt"].
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: OurVariable=col(source(s), name("OurVariable"))
GUIDE: axis(dim(1), label("OurVariable"))
GUIDE: axis(dim(2), label("Frequency"))
GUIDE: text.title(label("Bla bla",
"bla"))
ELEMENT: interval(position(summary.count(bin.rect(OurVariable, binStart(0.5)))),
shape.interior(shape.square))
END GPL.
As you can see, she would like to make the histogram columns green. We could not achieve that using the Chart Builder, but we could easily make a template via the Chart Editor window and apply that. This seems like a very sensible approach, as she has many charts she wants green.
She would also like to customize the y-axis labels (number of decimal places, tick "major increment" etc.). This can also be achieved using the Chart Editor and saving a template. However, this is a much more individualized edit, and making a custom template for each and every plot seems cumbersome. Is it possible to adjust these things directly in the Syntax-script which generates the plots?
In many other places there is a nice Paste-button which generates the necessacy code, but I could not find one in the Chart Editor.

Related

Julia LatexStrings plotting text subscripts

I am using PyPlot to plot things in Julia. I want my plot label to use LateX fonts so I'm using LatexStrings.
I would like to write a variable with subscript such that the subscript is not written in italics, i.e in Latex: $z_{\text{eff}}$.
The closest I can get with LatexStrings is L"z_{eff}" however the subscript is written in italics in that case.
Is what I am looking for possible with these packages (I don't want to switch to something other than PyPlot)?
You can do
L"z_{\mathrm{eff}}"
if you don't mind using \mathrm instead of \text to make the subscript be upright and non-italic.
L"z_{\text{eff}}" works in LaTeXStrings by itself, but sending that on to PyPlot messes something up. Things like \mathtt and \rm also work, but \textnormal and \textrm don't.

Tabulator - formatting print and PDF output

I am a relatively new user of Tabulator so please forgive me if I am asking anything that, perhaps, should be obvious.
I have a Tabulator report that I am able to print and create as a PDF, but the report's formatting (as shown on the screen) is not used in either output.
For printing I have used printAsHtml and printStyled=true, but this doesn't produce a printout that matches what is on the screen. I have formatted number fields (with comma separators) and these are showing correctly, but the number columns should be right-aligned but all of the columns appear as left-aligned.
I am also using Tree View where the tree rows are coloured differently to the main table, but when I print the report with a tree open it colours the whole table with the tree colours and not just the tree.
For the PDF none of the Tabulator formatting is being used. I've looked for anything similar to the printStyled option, but I can't see anything. I've also looked at the autoTable option, but I am struggling to find what to use.
I want to format the print and PDF outputs so that they look as close to the screen representation as possible.
Is there anywhere I could look that would provide examples of how to achieve the above? The Tabulator documentation is very good, but the provided examples don't appear to explain what I am trying to do.
Perhaps there are there CSS classes that I am missing or even mis-using? I have tried including .tabulator-print-table in my CSS, but I am probably not using it correctly. I also couldn't find anything equivalent for producing PDFs. Some examples would help immensely.
Thank you in advance for any advice or assistance.
Formatting is deliberately not included in these, below i will outline why:
Downloaders
Downloaded files do not contain formatted data, only the raw data, this is because a lot of the formatters create visual elements (progress bar, star formatter etc) that cannot be replicated sensibly in downloaded files.
If you want to change the format of data in the download you will need to use an accessor, the accessorDownload option is the one you want to use in this case. The accessors transform the data as it is leaving the table.
For instance we could create an accessor that prepended "Mr " to the front of every name in a column:
var mrAccessor= function(value, data, type, params, column, row){
return "Mr " + value;
}
Assign it to a columns definition:
{title:"Name", field:"name", accessorDownload:mrAccessor}
Printing
Printing also does not include the formatters, this is because when you print a Tabulator table, the whole table is actually rebuilt as a standard HTML table, which allows the printer to work out how to layout everything across multiple pages with column headers etc. The downside of this is that it is only loosely styled like a Tabulator and so formatted contents generated inside Tabulator cells will likely break when added to a normal td element.
For this reason there is also a accessorPrint option that works in the same way as the download accessor but for printing.
If you want to use the same accessor for both occasions, you can assign the function once to the accessor option and it will be applied in both instances.
Checkout the Accessor Documentation for full details.

VIM equivalent of IntelliJ's expand/shrink selection?

How would one achieve the same result. I believe the keybinding for macOS Intellij is op+up/down and on windows it is alt+w/d.
Essentially the function highlights the current word, then, with successive presses, expands out to the full string/line/area in-between parenthesis/further out to the next set of parenthesis. Very useful for developing in LISP.
The closest I've gotten is this: https://vi.stackexchange.com/a/19028
Try this plug in: https://github.com/terryma/vim-expand-region
It expands selections based on Vim’s text objects.
Well this may seem comfortable but does not correspondent with the internal logic of vim itself.
See, in vim everything you enter is like a sentence. va{ for example: there is a verb v -> visually select and an object (or movement) { -> paragraph. In this case there is also a modifier a around. You can exchange stuff in this sentence and it will still work vaw, dil, cB and so on. The power of vim is greatly based on that concept.
Of course you can write a function that does vaw first, then S-v and lastly va{ but that will only work with visual selection. It will not work with c or d or anything. So I will recommend to get used to use different keys for different actions.
The visual selection is mostly not needed anyway. Change a paragraph? directly use ca} and so on.
I have found that VI/VA + WOBO (as many times as you need to expand) works similarly. Not as fast but its the same concept and you can even expand/shrink asymmetrically based on your WO's and BO's (Or OW's and OB's depending on how you look at it)

Rebol 3 - R3-GUI - How to access text from an area?

I'm struggling a lot coming from R2 and dealing with faces. get-facet seems extremely unintuitive to me.
Let's say I have an area:
view [c: area "hello"] print get-facet c 'text-edit
get-facet always returns "hello" even if I type something else in the area. What is going on with this? The 'caret and 'state facet objects contain the correct text, but I cannot find a way to access them.
The correct command is get-face. Get facet should be used for
For the example above, it is fixed by:
view [c: area "hello"] print get-face c
From an explanation from Cyphre: get-face is intended for the application programmers but get-facet is intended for style developers because it directly accesses the style internals. If styles are updated it may break code if get-face is not used. One should avoid using refinements such as /text or /data on faces as it was easy to do in R2
AREA's facet TEXT-EDIT looks like it just stores the initialization, and the state/caret facet objects contain run-time data

Semantic mediawiki - Set propery to range of values

I'm trying to set a specific property to a non exact value, for example say that I want to define the height of a pine tree to usually between 3-80 m (according to wikipedia). Then I would like to set something like [[Has height::3-80]] (of course this doesn't work) and defining the unit to meters with "custom units". Then I would like to be able to query for example "trees that can reach the height of 70 meters" and the pine tree would be included. I've been searching and trying different angles for hours now and I can't figure it out. Tried with #set_recurring_event but that seems to be only for dates/time. Also understood how to set multiple values for a property with #arraymap but this doesn't seem to help me here. Really would appreciate help with this (it's probably very easy and right in front of me) Thx! COG
There's no such things. But you able to create template, with parameters you want. The you just use code kinda {{range|min|max|units}}. For example your range of heights looks like {{range|3|80|m}}.