Hello and happy Easter everybody!
Regarding the dataset and scatterplot below, I would like to know if it would be generally possible to split the x axis (60 values) in half and subsequently create a second x axis on top of the graph with a corresponding staggered visualization of the dots on the same y axis for the reason of space gain of the whole graph itself.
Thank you already sincerely for any advice and support!
data.frame(
stringsAsFactors = FALSE,
check.names = FALSE,
Company = c("NIED KUNSTSTOFF-TEXTIL",
"Nagel GmbH","BD SENSORS GmbH","TECHNOCHEM GMBH",
"Xaver Bosch","GEMA-Technik GmbH","Linker Industrie-Technik GmbH",
"Element Metech KDK GmbH","Heinzelmann GmbH",
"Intercontact GmbH","IAG GLUSKA GmbH ","AZS System AG",
"UM Electronic GmbH","Maprotec GmbH",
"CubiDesign Gehäuse GmbH","Q-BAT Oberflächen","Tucker GmbH","EMO Systems GmbH",
"EPN ELECTROPRINT GmbH","FOLA Abfülltechnik GmbH",
"YachtelektrONik Höppli","Vereinsbedarf Deitert GmbH",
"Haag Druck","Benz Alusysteme GmbH","B2B Hygiene e.Kfm",
"Peer-Span GmbH","ORDAT GmbH & Co. KG","Labomedic GmbH",
"Julius Blum GmbH","Nadella GmbH","RAMPF Technik",
"Ruhrbotics GmbH","m2m Germany GmbH","MABECO GmbH & Co. KG",
"System4all GmbH ","SAB Sägewerksanlagen GmbH",
"Fabian GmbH ","babp GmbH","Haas Sanitär","Ueberholz GmbH",
"WaBaCom GmbH","CSD Logistik Software GmbH",
"East-Tex GmbH","Eberspächer GmbH ","UGT 2000 GmbH",
"jafoplast GmbH","AAE Studio","SACCESS GmbH ",
"OBS Michalzik GmbH ","easyhyp GmbH ","MABEG Kreuschner","CEFIC",
"Gabory GmbH","Eberle Motoren GmbH","Saco Shipping GmbH",
"VRG CURAMUS GmbH","takuma OHG","Lace up! GmbH",
"Aagris e.K.",NA),
2017
= c(658187,254310,67826,473905,
735155,85546,876751,529764,355106,807324,671716,
866008,437234,676152,609098,968959,662482,367870,
525664,37733,477261,698401,485506,273852,376309,
826602,528832,803242,964322,608001,452039,669047,531454,
472688,712816,198140,587134,591129,546467,335460,
422745,314735,10531,723850,281095,682451,413384,
554999,261103,343448,512427,643661,760153,274679,
243492,190308,75825,735591,717542,427028),
2018
= c(727560,393289,104807,461526,
742667,81128,741267,598991,336967,816577,722132,
NA,772505,642375,540570,977253,753632,384648,526915,
51331,467907,725131,611686,261114,372124,830571,
511309,770075,881413,645145,502556,644972,442182,
373413,714513,208348,634342,626435,541061,443105,
615172,459462,16845,925239,220573,632661,461929,
523132,306272,202952,373733,682938,746800,385506,12777,
240561,96953,925368,741840,548611),
2019
= c(665346,247203,99166,495720,
786560,108115,943064,753831,373828,727487,891883,
NA,810404,595123,485798,923987,891428,521718,468212,
81447,606135,604271,944775,324888,429558,931834,
555963,770818,851152,762138,570597,616615,555044,
208589,862103,206624,636662,697567,626551,664949,
807946,454060,32776,869305,251651,619315,1337257,
645966,314475,522952,317399,693273,789966,453411,NA,
259981,207535,1013013,773367,563635),
2020
= c(741295,202858,92558,527192,
454681,130124,840286,1106443,373828,768923,562355,
NA,645502,595123,478402,978969,991798,513075,
604918,96406,NA,295270,863120,234664,508872,910187,
573186,786599,NA,NA,663679,NA,622908,NA,626653,
173207,724342,735178,682081,613924,1238149,NA,80635,
764198,315208,694729,1297585,401089,296099,289966,
203257,749571,798384,497972,NA,311898,200106,
1134086,702934,599833),
2021
= c(843014,202629,48866,553427,
856747,112258,NA,1125463,414871,865362,746239,NA,
702647,595123,NA,946340,784076,NA,799148,158311,
NA,478784,786928,NA,621963,927921,573133,852666,NA,
NA,754847,NA,568862,NA,652273,195991,730798,
755924,660670,887816,1791138,NA,NA,192792,388744,NA,
1366060,557443,276777,229632,168365,795699,817638,
631140,NA,320348,281204,1032339,708842,461453)
)
library(tidyr)
CL1 <- data1 %>% pivot_longer(!Company, names_to = "status", values_to = "Costs")
library(ggplot2)
ggplot(CL1, aes(Company, Costs, fill = status) ) +
geom_point(aes(shape = status)) +
labs(y = "Total number of Costs") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))