In [36]:
library(tidyverse)
library(data.table)
library(ggpubr)
library(tikzDevice)
options(scipen = 10)
In [37]:
csv1 <- fread("to_parity.csv")
In [52]:
p1 <- ggscatter(csv1, x="out_states_to_parity_old", y="out_states_to_parity_all", color="filename") +
    scale_x_log10() + scale_y_log10() + geom_abline(slope=1) + theme(legend.position = c(0.01, 1), legend.spacing.x = unit(0, 'mm'), legend.justification=c("left", "top"),
    legend.box.just="right", legend.margin=margin(0, 0, 0, 0), axis.text.y = element_text(angle = 90, hjust=.5),
    legend.title=element_blank(), legend.box.background=element_rect(color="black", size=1)) +
    labs(x="unoptimized CAR (states)", y="new paritization (states)")
p1 <- p1 + font("caption", size = 9) + font("xylab", size = 9) + font("xy.text", size = 9)
In [48]:
p1
Warning message:
“Removed 1 rows containing missing values (geom_point).”
In [46]:
tikz("plot.tex", sanitize=TRUE, standAlone=TRUE, width=2.5, height=2)
p1
dev.off()
Warning message:
“Removed 1 rows containing missing values (geom_point).”
png: 2
In [58]:
p2 <- ggscatter(csv1, x="out_states_to_parity_no_degen", y="out_states_to_parity_all", color="filename") +
    scale_x_log10() + scale_y_log10() + geom_abline(slope=1) + theme(legend.position = c(0.01, 1), legend.spacing.x = unit(0, 'mm'), legend.justification=c("left", "top"),
    legend.box.just="right", legend.margin=margin(0, 0, 0, 0), axis.text.y = element_text(angle = 90, hjust=.5),
    legend.title=element_blank(), legend.box.background=element_rect(color="black", size=1)) +
    labs(x="new paritization without partial-degen (states)", y="new paritization (states)")
p2 <- p2 + font("caption", size = 9) + font("xylab", size = 9) + font("xy.text", size = 9)
In [59]:
p2
Warning message:
“Removed 1 rows containing missing values (geom_point).”
In [61]:
tikz("plot2.tex", sanitize=TRUE, standAlone=TRUE, width=3, height=3)
p2
dev.off()
Warning message:
“Removed 1 rows containing missing values (geom_point).”
png: 2