GithubHelp home page GithubHelp logo

Comments (6)

jlstevens avatar jlstevens commented on June 1, 2024

Also very surprising. The second example you mention should also work fine:

import numpy as np
%load_ext holoviews.ipython
from holoviews import Image
Image(np.random.rand(5,5), label='A')(style={'cmap':'gray'})

Are you using HoloViews 1.0.1 from PyPI (i.e. installed with pip) or are you using a development version cloned from GitHub?

from holoviews.

jlstevens avatar jlstevens commented on June 1, 2024

Does the object far + near + pump + dmk display ok (i.e without an error) if you don't try setting the 'gray' color map?

By the way, if you want all Images to always to be shown with grayscale (by default) you can do:

Store.options.Curve = Options('style', cmap='gray')

Alternatively, you could set a group and set a style specific to that group. E.g if you have:

Image(read_dmk(files[index[3]]), label='M'+files[index[3]], group='DMK')

You could set this once for all Images that are to be displayed in the style of dmk:

Store.options.Image.DMK = Options('style', cmap='gray')

Hope that helps but I would still like to get to the bottom of your original error!

from holoviews.

vascotenner avatar vascotenner commented on June 1, 2024

The problem is in the label. Labels with '.' seems to be problematic:

Image(data, label='M09_pump.bmp')(style={'cmap':'Greens_r'})

Thank you for the suggestion to use groups. This makes the code more readable.

from holoviews.

jlstevens avatar jlstevens commented on June 1, 2024

We will probably just escape the period like everything else (when used for attribute access). This will be fixed by the next bug fix release (i.e very soon).

from holoviews.

jlstevens avatar jlstevens commented on June 1, 2024

This issue should now be fixed in 612f6d3. I'll keep this issue open for a while longer in case anyone has any comments on this commit.

from holoviews.

jlstevens avatar jlstevens commented on June 1, 2024

Ok. Looks like I can close this issue now.

from holoviews.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.