473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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.

Jul 18 '05 #1
1 22876
>>>>> "Colombes" == Colombes <Dr********@yahoo.com> 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
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dr. Colombes | last post by:
MatPlotLib question: How to get more different size plot symbols in the plot function ? Is there a way to get different size squares (or circles or triangles, etc.) ? For example, in a two...
6
by: Carl-Olof Almbladh | last post by:
Already in the 1st edition of the "White book", Kerigham and Ritchie states the "C is a general purpose language". However, without what is usually called "assumed size arrays" and built-in...
8
by: chellappa | last post by:
hi Everybody ! decalaring variable in a.h and using that vaaariable in a1.c and inalization is in main.c it is possible .........pleaase correct that error is it Possible? i am trying it...
4
by: nelsonchang | last post by:
Dear all, I wrote the VB code in a "button press event" as below in which is retrieve data from SQL server and insert the data into Excel. After that, I would call Excel "subtotal" API to build a...
17
by: yinglcs | last post by:
Hi, In STL, can I create a variable size but non-growable array? In Java, I can do this: int void f (int size) { int array = new int; // do something with array return array;
7
by: serrand | last post by:
Hello all, i wonder if we can know the size of a variable from a pointer : static void *my_free_hook (void *ptr, const void *caller) { size_t sz; /* bla bla bla */ /* HOW CAN I DETERMINE...
1
by: Abdul Samad | last post by:
Assalam mu Alikum, i understand the size of structure with no data types is zero. but why the size of structure variable is 1 Byte when the size of that structure is zeor? for example ...
0
by: David C | last post by:
I am getting this error in the Databound event of a GridView and I am having a difficult time debugging. I do not get the error on every record that I edit in the GridView. The error is occurring...
0
by: Paul Morriss | last post by:
I get this error from an application: ************** Exception Text ************** System.NullReferenceException: Object variable or With block variable not set. at...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.