Mercurial > op > ShinyEB
changeset 5:d37384e7e620
描画を調整
author | uncorrelated zombie <uncorrelated@yahoo.co.jp> |
---|---|
date | Thu, 27 Oct 2022 17:52:01 +0900 |
parents | 9befa2fab20c |
children | c31b9fd29920 |
files | EdgeworthBox.R ShinyEB.R |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/EdgeworthBox.R Thu Oct 27 17:51:15 2022 +0900 +++ b/EdgeworthBox.R Thu Oct 27 17:52:01 2022 +0900 @@ -222,13 +222,13 @@ pch <- 21 # 点の形状(21:丸, 22:四角, 23:菱形, 24:三角,25:逆三角, etc...) # 初期配分を描画 - if(SHP || IP){ + if(IP){ points(initial_goods["person 1", "g/s A"], initial_goods["person 1", "g/s B"], pch=pch, col="blue", bg="blue") text(initial_goods["person 1", "g/s A"] + xadj, initial_goods["person 1", "g/s B"], expression(I), adj=c(0, 0)) } # 競争均衡点を描画 - if(IC_E || SHP){ + if(IC_E){ points(goods["person 1", "g/s A"], goods["person 1", "g/s B"], pch=pch, col="black", bg="black") text(goods["person 1", "g/s A"] + xadj, goods["person 1", "g/s B"], expression(E), adj=c(0, 0)) }
--- a/ShinyEB.R Thu Oct 27 17:51:15 2022 +0900 +++ b/ShinyEB.R Thu Oct 27 17:52:01 2022 +0900 @@ -21,7 +21,7 @@ value = 0.3), checkboxInput("isIP", "Initial Point", TRUE), checkboxInput("isIC_I", "Indiffrent Curves pass through the Initial Point", TRUE), - checkboxInput("isCore", "Core", TRUE), + checkboxInput("isCore", "Core (this works only if the indiffrent curves above were plotted)", TRUE), checkboxInput("isIC_E", "Indiffrent Curves pass through the Equilibrium", TRUE), checkboxInput("isSHP", "Separating Hyperplane", TRUE), checkboxInput("isCC", "Contract Curve", TRUE) @@ -38,7 +38,7 @@ # inputにはwithが使えない drawEdgeworthBox(input$A, input$B, CC=input$isCC, SHP=input$isSHP, IC_I=input$isIC_I, IC_E=input$isIC_E, CORE=input$isCore, IP=input$isIP) - }, width=400, height=400) + }, width=500, height=500) } app <- shinyApp(ui = ui, server = server)