SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
2
3
(1)
4
(1)
5
6
(2)
7
(1)
8
(1)
9
(2)
10
11
12
(2)
13
(2)
14
(4)
15
(4)
16
(3)
17
18
(2)
19
20
(1)
21
(5)
22
(2)
23
(1)
24
(1)
25
26
(1)
27
(1)
28
(6)
29
(2)
30
(3)
31
(5)


Showing 5 results of 5

From: R H. <rha...@gm...> - 2014年07月21日 17:01:21
On 21 July 2014 17:40, R Hattersley <rha...@gm...> wrote:
> In the case of two Axes, the CSS version would be:
>
> Axes#axes1 {
> border: 1px solid black;
> }
>
> Axes#axes2 {
> border: 2px dashed green;
> }
>
>
Or if you want to borrow from more advanced selector syntax, you could do
fun stuff like:
Axes:nth-child(odd) {
 border: 1px solid black;
}
Axes:nth-child(even) {
 border: 2px dashed green;
}
From: R H. <rha...@gm...> - 2014年07月21日 16:40:07
On 21 July 2014 14:48, jamesramm <jam...@gm...> wrote:
> You've just noted it: Line2D isn't a CSS selector
CSS doesn't define any particular element names - it just operates on
element names in a document tree. So a standard CSS parser will work just
as well with "line2d { ... }" as it would with "h1 { ... }".
On 21 July 2014 14:48, jamesramm <jam...@gm...> wrote:
> ..likewise, the properties we want to call upon (like linewidth) are not
> CSS attributes.
Agreed - not all properties are standard CSS properties, so I was
suggesting borrowing SVG properties to augment the list. NB. That would
make the property controlling line width be called "stroke-width". But
whatever names we choose, a CSS parser doesn't care what the names are.
But really the issue is not so much about CSS and SVG-styling-properties -
it is whether to use existing standards or not. Clearly I'm in favour of
adopting standards. But perhaps there is another standard set of CSS
styling properties which would be a closer match to matplotlib? Perhaps CSS
is not the answer at all, and something like SLD/SE would be better? (I
suspect not! But there could easily be other technologies I'm not aware of!)
 Axes {
> gid: 'axes1';
> autoscalex_on: True;
> ::ylabel {
> text: 'Y-Axis';
> font-size: 10;
> }
> }
>
> I think this would be easier to parse and slightly clearer to read as it
> can be 'attached' to the artist container it refers to (imagine if there
> were 2 axes in a figure...)
In the case of two Axes, the CSS version would be:
Axes#axes1 {
 border: 1px solid black;
}
Axes#axes2 {
 border: 2px dashed green;
}
From: Thomas C. <tca...@gm...> - 2014年07月21日 16:28:44
As a side note, SVG already has specs which extend css to apply to 2D graphics:
www.w3.org/TR/SVGTiny12/styling.html
so we don't need to entirely re-inventing the wheel.
On Mon, Jul 21, 2014 at 9:48 AM, jamesramm <jam...@gm...> wrote:
> R Hattersley wrote
> I'm not sure what it is about CSS syntax that isn't up to the job. For
> example, SVG works with standard CSS syntax (see
> http://www.w3.org/TR/SVG/styling.html#StylingWithCSS). Perhaps we just have
> a different view of what constitutes CSS vs. HTML/SVG/whatever. The example
> in the SVG spec is:
>
> rect {
> fill: red;
> stroke: blue;
> stroke-width: 3
> }
>
> But if we define the element name for a Line2D instance as "line2d" then CSS
> snippet could just become:
>
> line2d {
> stroke: blue;
> stroke-width: 3
> }
>
> You've just noted it: Line2D isn't a CSS selector..likewise, the properties
> we want to call upon (like linewidth) are not CSS attributes. There are many
> matplotlib properties that don't have an analogous CSS property/attribute
> (that I know of); we might aswell define the mpl properties in our 'CSS'
> subset. So we could base our language on CSS rules, but we need to define
> new tokens. This means writing, or more likely, extending a parser. Not
> huge, but not trivial.
>
> R Hattersley wrote
> The DOM facade could help bridge the gap. For example, a "DOM" instance
> returned by an Axes object could pretend to have "text" element children.
> Styling those would route the style information back to the underlying Axes
> object. For example:
>
> text {
> font-size: 12pt;
> }
>
> axes text.ylabel {
> font-size: 10pt;
> }
>
> This could be one way. Another way that would fit and I quite like is
> similar to what is employed by mapnik/the tilemill, in that we simply have
> nested declaration blocks, e.g:
>
> Axes {
> gid: 'axes1';
> autoscalex_on: True;
> ::ylabel {
> text: 'Y-Axis';
> font-size: 10;
> }
> }
>
> I think this would be easier to parse and slightly clearer to read as it can
> be 'attached' to the artist container it refers to (imagine if there were 2
> axes in a figure...). It is also easy to write in BNF, by just adding
> another option to the Declaration block:
>
> Rule := Selector '{' [Declaration] '}'
>
> Declaration := Attribute':' Value';' | Rule
>
> ...
>
> But...small steps. I would start by introducing something for artist
> primitives and for selectively applying to primitives using the gid
> ________________________________
> View this message in context: Re: MEP26: Artist-level stylesheets
>
> Sent from the matplotlib - devel mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
-- 
Thomas Caswell
tca...@gm...
From: jamesramm <jam...@gm...> - 2014年07月21日 13:48:15
R Hattersley wrote
> I'm not sure what it is about CSS syntax that isn't up to the job.
> Forexample, SVG works with standard CSS syntax
> (seehttp://www.w3.org/TR/SVG/styling.html#StylingWithCSS). Perhaps we just
> havea different view of what constitutes CSS vs. HTML/SVG/whatever.The
> example in the SVG spec is:
> rect { fill: red; stroke: blue; stroke-width: 3}
> But if we define the element name for a Line2D instance as "line2d"
> thenCSS snippet could just become:
> line2d { stroke: blue; stroke-width: 3}
You've just noted it: Line2D isn't a CSS selector..likewise, the properties
we want to call upon (like linewidth) are not CSS attributes. There are many
matplotlib properties that don't have an analogous CSS property/attribute
(that I know of); we might aswell define the mpl properties in our 'CSS'
subset.So we could base our language on CSS rules, but we need to define new
tokens. This means writing, or more likely, extending a parser. Not huge,
but not trivial. 
R Hattersley wrote
> The DOM facade could help bridge the gap. For example, a "DOM"
> instancereturned by an Axes object could pretend to have "text" element
> children.Styling those would route the style information back to the
> underlying Axesobject. For example:
> text { font-size: 12pt;}axes text.ylabel { font-size: 10pt;}
This could be one way. Another way that would fit and I quite like is
similar to what is employed by mapnik/the tilemill, in that we simply have
nested declaration blocks, e.g:
 Axes { gid: 'axes1'; autoscalex_on: True; ::ylabel
{ text: 'Y-Axis'; font-size: 10; 
} }
I think this would be easier to parse and slightly clearer to read as it can
be 'attached' to the artist container it refers to (imagine if there were 2
axes in a figure...). It is also easy to write in BNF, by just adding
another option to the Declaration block:
Rule := Selector '{' [Declaration] '}'Declaration := Attribute':' Value';' |
Rule...
But...small steps. I would start by introducing something for artist
primitives and for selectively applying to primitives using the gid 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/MEP26-Artist-level-stylesheets-tp43664p43673.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.
From: R H. <rha...@gm...> - 2014年07月21日 09:38:59
On 20 July 2014 14:23, jamesramm <jam...@gm...> wrote:
> We cannot stick with the 'standard' CSS syntax by necessity, simply because
> the standard CSS selectors and properties are defined from HTML and do not
> match with matplotlib.
> I.E we want to select by artist type, which doesn't exist in HTML and use
> properties such as linewidth.
>
I'm not sure what it is about CSS syntax that isn't up to the job. For
example, SVG works with standard CSS syntax (see
http://www.w3.org/TR/SVG/styling.html#StylingWithCSS). Perhaps we just have
a different view of what constitutes CSS vs. HTML/SVG/whatever.
The example in the SVG spec is:
rect {
 fill: red;
 stroke: blue;
 stroke-width: 3
}
But if we define the element name for a Line2D instance as "line2d" then
CSS snippet could just become:
line2d {
 stroke: blue;
 stroke-width: 3
}
Sure, matplotlib doesn't define a genuine DOM, but I understand there is
interest in moving to a model more like that. In which case, perhaps a good
way to proceed in the meantime would be to have artists expose a DOM facade
suitable for styling. (Perhaps even using SVG element conventions?)
NB. matplotlib already uses pyparsing, so it would be pretty
straightforward to knock together a parser for CSS (or whatever subset is
needed). Or there are existing Python CSS parser libraries.
> Qt - Pyside/PyQt ('QSS')
> Mapnik ('CartoCSS')
> PyGal supports stylesheets (don't know much about this library)
>
>
If we don't use CSS then +1 for using some other standard.
> As I say, an alternative could be simply using the ConfigParser
>
>
> Richard Hattersley wrote
> >>
> >> Do you have ideas on how one or more stylesheets would be "attached" to
> a
> >> particular figure, etc?
> >>
> >> Regards,
> >> Richard Hattersley
> >>
>
>
> b) Filtering artists
> Another problem is that we would generally want to treat artists which are
> solely for the construction of the Axes differently to those artists that
> define a plot. I.E we might want to define Line2D as having the colour red,
> but we want lines which compose the Axes to be black or grey.
> My initial proposal is to develop stylesheets for artist primitives only.
> But eventually we will want to style artist containers aswell.
> The problem matplotlib has is that the properties for artist containers are
> not uniform/intuitive.
> It generally has a API where artists which are 'contained' by other artists
> are set by calling properties...e.g. axes.set_ylabel(text = , etc...)
>
The DOM facade could help bridge the gap. For example, a "DOM" instance
returned by an Axes object could pretend to have "text" element children.
Styling those would route the style information back to the underlying Axes
object. For example:
text {
 font-size: 12pt;
}
axes text.ylabel {
 font-size: 10pt;
}
I would imagine setting stylesheets through the axes or figure methods
> (axes.setStyleSheet() or figure.setStyleSheet()). Via figure would require
> being able to differentiate between different axes - i.e. introducing the
> 'container' level syntax I mentioned above.
>
> I would imagine that this would eventually replace rcparams to define the
> default style. I would also like to see the default look of graphs moving
> away from the very dated, 90's style MATLAB appearance!
>
That would be an excellent start. More complicated mechanisms can always be
added later if necessary.
Richard

Showing 5 results of 5

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /