question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plate label appears in a blue box

See original GitHub issue

Hello! I can’t figure out this behavior. This code (see below) produces the right figure but the plate label is colored (see fig):

pgm = daft.PGM(shape=[2., 4.], # width, height
               origin=[0, 0], 
               grid_unit=4,
               label_params={'fontsize':20}, 
               observed_style='shaded')

pgm.add_node(daft.Node("R", r"$R$", 1, 0.5, scale=2))
pgm.add_node(daft.Node("alpha", r"$\alpha$", 1, 1.5, scale=2))
pgm.add_node(daft.Node("r", r"$r$", 1, 2.5, scale=2))

pgm.add_node(daft.Node("xi", r"$\xi$", 1, 3.5, scale=2,
                       fixed=True, offset=(0,10)))

pgm.add_plate(daft.Plate([0.5, 0.1, 1, 3.0], r"$k=0,...,11$",position='bottom right', rect_params={fill:False}))


# draw directed edges
pgm.add_edge("alpha", "R")
pgm.add_edge("r", "alpha")
pgm.add_edge("xi", "r")

pgm.render()

enharmonic_spectrum )

Otherwise, it’s a great package! Thanks for the work!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
dfmcommented, Jun 15, 2018

OK. Here’s what I get when I run your code on matplotlib v2.2.0:

download-12

I am fairly confident that you must have some default matplotlib settings somewhere.

A few options:

  1. Look into how matplotlib is customized and make sure that you’re not using any customizations (e.g. a matplotlibrc file somewhere)
  2. Add:
import matplotlib as mpl
mpl.rcParams.update(mpl.rcParamsDefault)
  1. Add: bbox={"color": "none"} to the daft.Plate instantiation

Hope this helps!

2reactions
fabianmosscommented, Jun 15, 2018

Thanks for the tips! The last one worked 😉 It’s a bit of a hack but it works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plate label appears in a blue box · Issue #102 · daft-dev/daft
Hello! I can't figure out this behavior. This code (see below) produces the right figure but the plate label is colored (see fig):...
Read more >
DOT Hazmat Labels, Placards, and Markings - A Guide
Want to learn more about hazard class labels, DOT placards, hazmat markings and more. Get the answers from your total compliance resource, Labelmaster....
Read more >
Cancer Warning Labels Based on California's Proposition 65
Labels warning that a product contains compounds that may cause cancer, birth defects, or reproductive harm are now required on many ...
Read more >
EU - Labeling/Marking Requirements
A mark is a symbol and/or pictogram that appears on a product or its respective packaging. These range in scope from signs of...
Read more >
Blue Plate Music Label | Releases - Discogs
Catalog Number Artist Label Country Year Actions 510729 2 Uncle Tupelo Columbia, Columbia, Legacy Europe 2003 Sell This Ver... 514 494‑2 Various Blue Plate Music,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found