Skip to content

Running ncplot without a server? #2

Open

Description

@ledm

I generally run code interactively via ssh (without x windows). Is there any way to run ncplot without a X window server?

Typically, I would run:

import matplotlib
matplotlib.use('QtAgg')

then save figures to disk instead of plotting them. That isn't working for ncplot. Any ideas @robertjwilson?

Activity

  1. robertjwilson commented on May 2, 2023

    @robertjwilson
    Member

    You should be able to do this using the out argument. Something like the following. Potentially that can create a very big file, though only if you are plotting something big.

    import ncplot
    ncplot.view("foo.nc", out = "foo.html")
    
  2. ledm commented on May 2, 2023

    @ledm
    MemberAuthor

    Does it have to be output as html?

  3. robertjwilson commented on May 2, 2023

    @robertjwilson
    Member

    At the minute, it will require it to be .html. It uses hvplot and as far as I understand it there is no option other than html for outputting the plots.

    If it's a lonlat grid, and you only one variable/time/depth to plot, you can use nctoolkit's pub_plot method.

    ds.pub_plot()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions