首页 \ 问答 \ matplotlib标记中的多种颜色填充(Multiple color fills in matplotlib markers)

matplotlib标记中的多种颜色填充(Multiple color fills in matplotlib markers)

我想在matplotlib制作的标记中使用多种颜色。 按照此示例 ,使用本文档中的一些其他信息,做两种颜色并不困难。 但是,我想知道是否可以制作超过2种颜色的标记。 我正处于一种情况,我希望单个标记实际上获得3种不同的颜色(地图上的一个点指的是三种不同的观察结果)。


I want to use multiple colors in a marker made with matplotlib. Doing two colors was not that difficult, following this example, and with some additional info from this documentation. However, I was wondering if it is possible to make a marker with more than 2 colors. I'm in a situation where I want a single marker to actually get 3 different colors (a point on a map refers to three different observations).


原文:https://stackoverflow.com/questions/41167300
更新时间:2023-10-18 09:10

最满意答案

您可以通过提供自己的渲染工具包来装饰渲染器。 为此,使用带有RenderKitFactory类型参数的公共构造函数创建RenderKitFactory 。 在faces-config.xml定义新的RenderKitFactory 。 在初始化期间,JSF框架会将先前配置的RenderKitFactory传递给构造函数。

有关更多详细信息,请参阅JSF规范


You can decorate renderers by providing your own render kit. To do this, create a RenderKitFactory with a public constructor that takes an argument of type RenderKitFactory. Define the new RenderKitFactory in a faces-config.xml. During initialization, the JSF framework will pass the previously configured RenderKitFactory to your constructor.

See the JSF spec for more details.

相关问答

更多
  • SDL_Window SDL_Window是包含Window本身的所有信息的结构:大小,位置,全屏,边框等。 SDL_Renderer SDL_Renderer是一个处理所有渲染的结构。 它绑定到SDL_Window因此它只能在该SDL_Window内SDL_Window 。 它还跟踪与渲染相关的设置。 有几个与SDL_Renderer绑定的重要功能 SDL_SetRenderDrawColor(renderer, r, g, b, a); 这将设置您清除屏幕的颜色(见下文) SDL_RenderClear ...
  • 这种行为是因为你指定的 cell: { xtype: 'textcell' } 首先。 只需将其删除,然后renderer就可以返回HTML。 这应该工作: { xtype: 'gridcolumn', renderer: function(value, record, dataIndex, cell, column) { console.log('hello world'); return '...'; }, widt ...
  • 您需要做两件事来让主题渲染器覆盖核心渲染器: 你需要编辑主题的config.php来添加这行:$ THEME-> rendererfactory ='theme_overridden_renderer_factory'; 您需要将渲染器类命名为'theme_NAMEOFTHEME_format_topcoll_renderer'(并像您一样扩展'format_topcoll_renderer')。 theme_overridden_renderer_factory通过扩展实例化渲染器以查找与名称'theme ...
  • 您可以设置一个新的DefaultTableRenderer()。 它也应该可以在你的渲染器中使用。 或者,您可以扩展DefaultTableRenderer。 You can set a new DefaultTableRenderer(). It should be possible too in your Renderer. Alternatively you could extend DefaultTableRenderer.
  • 可能有帮助的是使用显式方法创建响应器(并使用较新的respond_with ): class ActionController::Responder def to_my_custom_renderer controller.render :my_custom_renderer => controller.action_name end end What might help is to create a responder (and use the newer respond_with) ...
  • 您可以通过提供自己的渲染工具包来装饰渲染器。 为此,使用带有RenderKitFactory类型参数的公共构造函数创建RenderKitFactory 。 在faces-config.xml定义新的RenderKitFactory 。 在初始化期间,JSF框架会将先前配置的RenderKitFactory传递给构造函数。 有关更多详细信息,请参阅JSF规范 。 You can decorate renderers by providing your own render kit. To do this, c ...
  • 正如您在此处所见,您可以通过连接default + class name + property来构建您希望的每个“默认属性”。 在你的情况下,它将是: set(0, 'defaultFigureRenderer', 'painters') 分别 set(groot, 'defaultFigureRenderer', 'painters') 你可以通过get(groot,'default')来检查。 请注意,默认值仅为当前会话设置! 重新启动会省略更改。 要将其永久设置,请将该行放入启动文件中 。 As ...
  • 这不是完整的解决方案,更多一些提示; 因为ExtJS中的int不能再为null,所以你总是会以0结束。你可以创建一个支持null的自定义类型,然后你就可以了。 或者,如果您不需要任何计算渲染全部为字符串。 编辑: 到现在为止 ,您可以在字段上定义useNull ,另外还可以定义defalutValue 。 但这并不是所有你也可以定义自定义转换器和/或自定义序列化 r。 所以在使用可空类型时不应该有任何问题。 That's no complete solution, more some hints; sinc ...
  • 是否可以覆盖h:selectOneRadio使用的渲染器? 是的,肯定是的。 否则,PrimeFaces等UI组件库可能不存在。 我试图从jsf-impl包中找到该类,但没有找到它。 确切的类取决于您正在使用的JSF实现。 如果是Mojarra,那么它就是com.sun.faces.renderkit.html_basic.RadioRenderer类。 如果它是MyFaces,那么它是org.apache.myfaces.renderkit.html.HtmlRadioRenderer类。 为了正确覆盖它 ...
  • 你能否指出窗口和网格的实现。 只需检查窗口关闭动作 closeAction:String 单击关闭标题工具时要执行的操作:'destroy':从DOM中删除窗口并销毁它和所有后代组件。 该窗口无法通过show方法重新显示。 'hide':通过设置隐藏可见性和应用负偏移来隐藏窗口。 该窗口可通过show方法重新显示。 注意:此行为已更改! 设置确实会影响将调用approriate closeAction的close方法。 默认为:“销毁” 因为当您通过ID访问网格时,如果隐藏了关闭操作,那么很可能每次使用相同 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)