Skip to content

Installation

Detailed installation instructions for all supported platforms.

Before you begin, create a free account at app.gofigr.io/register.


  • Python 3.8 or higher
  • pip
Terminal window
pip install gofigr

This installs both the client library and the IPython extension (compatible with Jupyter, VSCode, and others).

After installation, run the gfconfig command-line tool:

Terminal window
gfconfig

This will prompt you for your credentials and save them to ~/.gofigr.

For advanced options (custom API URL, auto-publish settings, default metadata):

Terminal window
gfconfig --advanced

The simplest way to use GoFigr in Jupyter is to load the extension:

%load_ext gofigr

That’s it! All figures you create will be automatically published.

For custom configuration:

%load_ext gofigr
from gofigr.jupyter import configure, FindByName
configure(
workspace=FindByName("My Workspace"),
analysis=FindByName("My Analysis", create=True),
auto_publish=True
)

For standalone Python scripts, use the Publisher class:

import matplotlib.pyplot as plt
from gofigr.publisher import Publisher
pub = Publisher(workspace="My Workspace", analysis="Script Analysis")
plt.plot([1, 2, 3], [1, 4, 9])
plt.title("My Plot")
pub.publish(plt.gcf())

Instead of using gfconfig, you can set environment variables:

Variable Description
GF_USERNAME Your GoFigr username
GF_PASSWORD Your GoFigr password
GF_API_KEY Your API key (alternative to username/password)
GF_WORKSPACE Workspace API ID
GF_ANALYSIS Analysis API ID
GF_URL API URL (default: https://api.gofigr.io)
GF_AUTO_PUBLISH true or false

  • R 4.0 or higher (tested with R 4.3.2)
install.packages("gofigR")

For the latest development version:

library(devtools)
devtools::install_github("gofigr/gofigR")

On the R prompt, load the package and run the configuration wizard:

library(gofigR)
gfconfig()

This will prompt you for your credentials and save them to ~/.gofigr.

In your setup chunk, enable GoFigr:

```{r setup, include=FALSE}
library(gofigR)
gofigR::enable()
```

You can optionally specify an analysis name:

gofigR::enable(analysis_name = "My Analysis")

Use the publish() function to capture figures:

library(ggplot2)
# ggplot2
p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()
publish(p, "Weight vs MPG")
# Or with pipe
p %>% publish("Weight vs MPG")

For base R graphics, wrap the plotting code:

publish({
plot(pressure, main = "Pressure vs Temperature")
text(200, 50, "Note the non-linear relationship")
}, figure_name = "Pressure Plot")

Replace plotOutput + renderPlot with gfPlot + gfPlotServer:

library(shiny)
library(gofigR)
gofigR::enable()
ui <- fluidPage(
titlePanel("My App"),
mainPanel(
gfPlot("myPlot")
)
)
server <- function(input, output) {
gfPlotServer("myPlot", {
hist(faithful$eruptions, main = "Eruption Duration")
}, input, figure_name = "Faithful Histogram")
}
shinyApp(ui = ui, server = server)

Both Python and R store configuration in ~/.gofigr. This file is created automatically by the gfconfig command/function.


If you get authentication errors:

  1. Run gfconfig again to update your credentials
  2. Check that your API key is valid in the GoFigr web app
  3. Verify environment variables if using them
  • Verify you can reach https://api.gofigr.io
  • Check firewall settings if on a corporate network
  • For enterprise installations, ensure GF_URL is set correctly

For more help, visit gofigr.io/support.