Migradoc - aligning a table vertically - migradoc

I would like to position my table by controlling its placement both vertically and horizontally.
I can place it horizontally using the following:
Commodtable.Rows.LeftIndent = "5cm"
How do I do the same but vertically? I know there is verticalalignment but there are only 3 options: Top, Middle and bottom.
This is so i can eventually place 6 tables in a 3 x 2 arrangement.

To get the 3 x 2 arrangement you can add tables to a table.
See this post:
https://stackoverflow.com/a/36304148/162529
Do draw a table at an absolute position you can add the table to a TextFrame object.
But to get the 3 x 2 arrangement, I would probably prefer nested tables.

Related

How to plot column chart with bars for 2 categories next to each other?

I need to draw chart like this one. I have 2 categories, named 0 and 1. I want to plot "age vs amount" etc with 2 categories compared next to each other.
df.groupby(by = df['target']).plot(kind='bar')
but it draws 2 separate charts.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.bar.html
You can find the sub-plot documentation here for making a bar chart like your requirement

One ggplot from two data frames (1 bar each)

I was looking for an answer everywhere, but I just couldn't find one to this problem (maybe I was just too stupid to use other answers, because I'm new to R).
I have two data frames with different numbers of rows. I want to create a plot containing a single bar per data frame. Both should have the same length and the count of different variables should be stacked over each other. For example: I want to compare the proportions of gender in those to data sets.
t1<-data.frame(cbind(c(1:6), factor(c(1,2,2,1,2,2))))
t2<-data.frame(cbind(c(1:4), factor(c(1,2,2,1))))
1 represents male, 2 represents female
I want to create two barplots next to each other that represent, that the proportions of gender in the first data frame is 2:4 and in the second one 2:2.
My attempt looked like this:
ggplot() + geom_bar(aes(1, t1$X2, position = "fill")) + geom_bar(aes(1, t2$X2, position = "fill"))
That leads to the error: "Error: stat_count() must not be used with a y aesthetic."
First I should merge the two dataframes. You need to add a variable that will identify the origin of the data, add in both dataframes a column with an ID (like t1 and t2). Keep in mind that your columnames are the same in both frames so you will be able to use the function rbind.
t1$data <- "t1"
t2$data <- "t2"
t <- (rbind(t1,t2))
Now you can make the plot:
ggplot(t[order(t$X2),], aes(data, X2, fill=factor(X2))) +
geom_bar(stat="identity", position="stack")

Plotting count in Excel

My data is like :
Portfolio Type of Assets Count
Portfolio 1 Type A 10
Type B 5
Type C 7
Portfolio 2 Type A 5
Type B 10
I am trying to plot a Bar graph where the each bar will have Portfolio 1 or similar on x-axis, the count of assets on the bar representing different colors and labels of colors like Red area in a bar represents the Type A assets. How can I plot that, I have tried this for a very long time, but not able to get it. Can anyone throw some hint please?
Click here and watch a YouTude, you will discover select data.

Getting a series in a chart to have different colours for each series item

I have 10 items:
Col1, Col2
One, 1
Two, 7
Three, 45
Four, 2
etc...
By default each series is one colour, so each bar in the chart is the same colour. I would like each bar to have a different colour or gradient.
I can do it by switching the labels to be at the side, but I would like the labels of the series to be on the bottom.
Select a data point (a bar),
Right click > Format Data Point > Fill > Select vary colours by point.
It adds a legend to the right, but you can remove that if you want.

GNUPLOT: dot plot with data depending dot size

I am trying plot data sets consisting of 3 coordinates:
X-coordinate, x-coordinate and the number of occurrences.
example:
1 2 10
3 1 2
3 2 1
I would like to draw for every line a dot at x,y with a diameter which is depending on the third value.
Is that possible with Gnuplot?
Create a 2D plot with variable point size. See the demo.
Example:
plot 'dataFile.dat' u 1:2:3 w points lt 1 pt 10 ps variable
This is basically equivalent to the existing answer, just shorter:
plot 'dataFile.dat' with circles
Credit: Gnuplot: plot with circles of a defined radius