graphing

Grouped bar Graph using barplot [duplicate]

时间秒杀一切 提交于 2019-11-28 05:39:12
问题 Possible Duplicate: How to create grouped barplot with R Species Dbh Height 1 DF 383.7143 254.3036 2 ES 403.3333 280.0000 3 F 372.0000 270.0000 4 FG 381.5000 275.0000 5 GF 351.5838 242.6522 6 HW 209.0000 198.0000 7 LP 232.8571 218.3333 8 PP 568.5000 330.0000 9 SF 136.4286 154.1000 10 WC 375.0757 234.8777 11 WL 340.0588 252.5714 12 WP 319.7273 251.3939 I want to turn the data above into a bar graph like this one. Species as bins and dbh and height as bars for each bin. I used the code:

gnuplot vs Matplotlib

こ雲淡風輕ζ 提交于 2019-11-28 03:05:27
I've started on a project graphing Tomcat logs using gnuplot-py , specifically correlating particular requests with memory allocation and garbage collection. What is the collective wisdom on gnuplot-py vs Matplotlib for Python graphing. Are there better graphing libraries out there I haven't heard of? My general considerations are: While gnuplot has large amounts of documentation, gnuplot-py doesn't. How good is documentation community for Matplotlib? Are there things which gnuplot can do, but gnuplot-py can't? Does Matplotlib have better Python support? Are there are big show stopping bugs in

Polar contour plot in Matplotlib

谁说我不能喝 提交于 2019-11-27 21:49:28
问题 I have a set of data that I want to use to produce a contour plot in polar co-ordinates using Matplotlib. My data is the following: theta - 1D array of angle values radius - 1D array of radius values value - 1D array of values that I want to use for the contours These are all 1D arrays that align properly - eg: theta radius value 30 1 2.9 30 2 5.3 35 5 9.2 That is, all of the values are repeated enough times so that each row of this 'table' of three variables defines one point. How can I

R plot filled.contour() output in ggpplot2

让人想犯罪 __ 提交于 2019-11-27 15:10:37
问题 I want to plot this figure created with filled.contour(), but in ggplot2, how do I do this? I want to use ggplot2 because the graphing conventions are easier. The reason I want to use filled.contour() is because I tried geom_tile() and image.plot() and they both created very tile like outputs, and I need an output similar to filled.contour(). This is my figure: Code: library(akima) df <-read.table("Petra_phytoplankton+POM_xydata_minusNAs_noduplicates.txt",header=T) attach(df) names(df) fld <-

Matplotlib log scale tick label number formatting

谁说我不能喝 提交于 2019-11-27 11:46:53
With matplotlib when a log scale is specified for an axis, the default method of labeling that axis is with numbers that are 10 to a power eg. 10^6. Is there an easy way to change all of these labels to be their full numerical representation? eg. 1, 10, 100, etc. Note that I do not know what the range of powers will be and want to support an arbitrary range (negatives included). Joe Kington Sure, just change the formatter. For example, if we have this plot: import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.axis([1, 10000, 1, 100000]) ax.loglog() plt.show() You could set the tick

grouped bar graph

﹥>﹥吖頭↗ 提交于 2019-11-27 05:38:45
问题 I have the following data: bin groupname total_dist 0 rowA 377 0 rowA 306.6 0 rowB 2.1 0 rowB 110.6 1 rowA 918.1 1 rowA 463.2 1 rowB 798.2 1 rowB 1196 2 rowA 1295.1 2 rowA 1269.1 2 rowB 698 2 rowB 1022.1 Using R, I want to make a bar graph where there is a bar for rowA and a bar for rowB for each bin. I can group total_dist by one or the other ( plot(total_dist~bin) or plot(total_dist~groupname) ). But I can't figure out how to combine them. I want something that looks similar to this example

gnuplot vs Matplotlib

淺唱寂寞╮ 提交于 2019-11-27 05:05:53
问题 I've started on a project graphing Tomcat logs using gnuplot-py, specifically correlating particular requests with memory allocation and garbage collection. What is the collective wisdom on gnuplot-py vs Matplotlib for Python graphing. Are there better graphing libraries out there I haven't heard of? My general considerations are: While gnuplot has large amounts of documentation, gnuplot-py doesn't. How good is documentation community for Matplotlib? Are there things which gnuplot can do, but

Matplotlib log scale tick label number formatting

£可爱£侵袭症+ 提交于 2019-11-26 13:00:36
问题 With matplotlib when a log scale is specified for an axis, the default method of labeling that axis is with numbers that are 10 to a power eg. 10^6. Is there an easy way to change all of these labels to be their full numerical representation? eg. 1, 10, 100, etc. Note that I do not know what the range of powers will be and want to support an arbitrary range (negatives included). 回答1: Sure, just change the formatter. For example, if we have this plot: import matplotlib.pyplot as plt fig, ax =

Matplotlib - Move X-Axis label downwards, but not X-Axis Ticks

北战南征 提交于 2019-11-26 10:21:13
问题 I\'m using Matplotlib to plot a histogram. Using tips from my previous question: Matplotlib - label each bin, I\'ve more or less go the kinks worked out. There\'s one final issue - previously - the x-axis label (\"Time (in milliseconds)\") was being rendered underneath the x-axis tickmarks (0.00, 0.04, 0.08, 0.12 etc.) Using the advice from Joe Kingston (see question above), I tried using: ax.tick_params(axis=\'x\', pad=30) However, this moves both the x-axis tickmarks (0.00, 0.04, 0.08, 0.12

Matplotlib - label each bin

情到浓时终转凉″ 提交于 2019-11-26 02:29:13
问题 I\'m currently using Matplotlib to create a histogram: import matplotlib matplotlib.use(\'Agg\') import matplotlib.pyplot as pyplot ... fig = pyplot.figure() ax = fig.add_subplot(1,1,1,) n, bins, patches = ax.hist(measurements, bins=50, range=(graph_minimum, graph_maximum), histtype=\'bar\') #ax.set_xticklabels([n], rotation=\'vertical\') for patch in patches: patch.set_facecolor(\'r\') pyplot.title(\'Spam and Ham\') pyplot.xlabel(\'Time (in seconds)\') pyplot.ylabel(\'Bits of Ham\') pyplot