Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Variable size plot symbols, variable hue plot colors in Python (MatPlotLib) ?

Reply
Thread Tools

Variable size plot symbols, variable hue plot colors in Python (MatPlotLib) ?

 
 
Dr. Colombes
Guest
Posts: n/a
 
      02-10-2005
Using MatPlotLib plot function, is there a way to get variable size
plot symbols? For example, using symbol strings like 'o' (circle), 's'
(square), 'x' (cross), etc., is there a way to specify other plot
symbols such a small circle, Medium square, LARGE cross, etc.?

Similarly, using the MatPlotLib plot function, is there a way to get
variable hue (RGB-specified) plot colors? For example, using symbol
strings like 'b' (blue), 'g' (green), 'red' (red), etc., is there a way
to specify other colors such as light blue, dark green, pink, etc.?

Or perhaps is there some other Python MatPlotLib or other Python module
functions that allow variable size plot symbols and variable hue plot
colors in Python ?

Thank you for your suggestions.

 
Reply With Quote
 
 
 
 
John Hunter
Guest
Posts: n/a
 
      02-10-2005
>>>>> "Colombes" == Colombes <> writes:

Colombes> Using MatPlotLib plot function, is there a way to get
Colombes> variable size plot symbols? For example, using symbol
Colombes> strings like 'o' (circle), 's' (square), 'x' (cross),
Colombes> etc., is there a way to specify other plot symbols such
Colombes> a small circle, Medium square, LARGE cross, etc.?

plot(x, y, 'o', markersize=10) # big
plot(x, y, 'o', markersize=20) # bigger

Colombes> Similarly, using the MatPlotLib plot function, is there
Colombes> a way to get variable hue (RGB-specified) plot colors?
Colombes> For example, using symbol strings like 'b' (blue), 'g'
Colombes> (green), 'red' (red), etc., is there a way to specify
Colombes> other colors such as light blue, dark green, pink, etc.?

All legal html color names are supported

>>> plot(x, y, 'o', markersize=10, markerfacecolor='green', markeredgecolor='red')


Eg

lightblue : #ADD8E6
lightcoral : #F08080
lightcyan : #E0FFFF
lightgoldenrodyellow : #FAFAD2
lightgreen : #90EE90
lightgrey : #D3D3D3
lightpink : #FFB6C1
lightsalmon : #FFA07A
lightseagreen : #20B2AA
lightskyblue : #87CEFA
lightslategray : #778899
lightsteelblue : #B0C4DE
lightyellow : #FFFFE0


# or use aliases for less typing
>>> plot(x, y, 'o', ms=10, mfc='green', mec='red')


# or rgba or hex
>>> plot(x, y, 'o', ms=10, mfc='#008000, mec=(1,0,0,1) )



Colombes> Or perhaps is there some other Python MatPlotLib or
Colombes> other Python module functions that allow variable size
Colombes> plot symbols and variable hue plot colors in Python ?

The scatter command supports markers with varying sizes and colors.
screenshot with example code at
http://matplotlib.sourceforge.net/sc...#scatter_demo2 .
Docs at
http://matplotlib.sourceforge.net/ma....html#-scatter.

You might want to check out the tutorial and/or the user's guide.
Most of these issues are touched on there.

JDH
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any library that can convert RGB colors to ANSI colors? ZelluX Python 3 12-01-2008 11:08 AM
TreeNode colors come from anchor colors AAaron123 ASP .Net 1 08-07-2008 07:56 PM
HELP with Hue for VHS-->DVD Transfer PC DVD Video 1 05-29-2004 12:39 AM
Windows Media Player 9 --- I can't get the brightness, hue, and other video controls to display.... Daveyboy Computer Support 7 05-15-2004 01:16 AM
how to calculate hex values from hue , sat and lum? Fjodor Klondyke HTML 9 01-14-2004 07:32 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57