Netlogo world is 500x500, making the text on the buttons too small. How can I change the size of the text on the buttons?

Viewed 55

In Netlogo, I am using the gis extension to import a boolean raster. The cell has a value of 0 indicating the absence of some feature and a value of 1 indicating the presence of some feature. The original raster is 558 rows x 615 columns.

If I resize the world to be large (even 250 x 250), I need to use CTRL - so that I can see the entire world in the GUI. This results in the text on my buttons being too small. enter image description here

If I resize the world to be 10% of its original size and smaller (so it fits nicely in the GUI), the sampling algorithm down samples my raster so that I lose a lot of data.

enter image description here

How can I change the size of the text on my buttons?

Here is my code:

extensions [gis]

globals[
  water-data ;;water data
]

patches-own[
  is_water
]

to setup
  clear-all
  reset-ticks
  ask patches [set pcolor white]
  resize-world 0 61 0 55
  set water-data gis:load-dataset "data/water_con.asc"
  gis:set-sampling-method water-data "BICUBIC"
  gis:set-world-envelope-ds gis:envelope-of water-data
  gis:apply-raster water-data is_water
  ask patches with [is_water = 1][set pcolor gray + 1]

end
1 Answers

Unfortunately there is no way to edit the font size used by widgets in the NetLogo interface tab in code or config. You can adjust the zoom settings using Ctrl+ or Ctrl-, but that only lasts until you close the model, as you found.

You can adjust the Patch size of the view, however. Right click on the view and go to Edit... to open the Model Settings dialog. Docs for these settings are here.

setting patch size to 1 in model settings

If you set the Patch size to 1 you can get single pixel per patch, which looks as below. This is with a world of size 558x615. This looks about as usable to me as the "low resolution" solution you put in the question.

model with 500x500 size with patch size 1

You can even set a fractional patch size, but the smallest I'd recommend going is 0.5. I'm actually not 100% sure that's totally supported, and it'll definitely make your model almost impossible to see.

Related