# HG changeset patch # User uncorrelated zombie # Date 1666860721 -32400 # Node ID d37384e7e620180eb73c5950ccbbbdc9747048fb # Parent 9befa2fab20ca7bf8f02cb6aac80246e4e7b7782 描画を調整 diff -r 9befa2fab20c -r d37384e7e620 EdgeworthBox.R --- 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)) } diff -r 9befa2fab20c -r d37384e7e620 ShinyEB.R --- 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)