histogram

    0熱度

    1回答

    一個條形圖繪製兩個字典我有我想要使用Matplotlib相同的條形圖中繪製這兩個字典: accuracy_pre = {"Random Forest": rf_accuracy_score, "Logistic Regression": log_accuracy_score, "KNN": knn_accuracy_score} accuracy_post = {"Random Forest"

    0熱度

    1回答

    我是R的初學者。我設法將我的數據繪製成重疊直方圖。不過,我想將所有的直方圖放在一個頁面上。我掙扎着,因爲我無法告訴R,哪個選擇(只能設法繪製其中一個地塊)。 這是代碼: df<-read.csv("Salt dshalo sizes.csv",header=T) #View(df) library(ggplot2) DSA<-df[,1] DS1<-d

    1熱度

    1回答

    我在每個圖表上顯示圖例時遇到問題。 Overlapping Histograms on one page 我想每個都在右上角有個傳說。但是,在我使用的命令行中,我獲得了放大版本。 par(mfrow = c(2,2)) #plot histograms on one same graph hist(DSA, prob=TRUE, main="Controls", xlab="Sizes (u

    2熱度

    2回答

    我創建了一個條形圖來顯示越南的人口分佈。這是我的vietnam2015數據: Year Age.group Est.pop 1 2015 0-4 7753 2 2015 5-9 7233 3 2015 10-14 6623 4 2015 15-19 6982 5 2015 20-24 8817 6 2015 25-29 8674 7 2015 30-34 7947 8

    0熱度

    1回答

    在R,一個可以做 x <- rnorm(100, 0, 1) # generate some fake data hgram <- hist(x, plot=F) plot(hgram$mids, hgram$counts) 一個可以進一步指定的曲線的類型,如「H」或「S」。然而,這些看起來並不像一個合適的直方圖。如何用這種方式製作一個很好看的直方圖?

    1熱度

    2回答

    直方圖結果我好像有奇怪的問題,當我繪製以下,似乎兩個柱狀圖的條不會有相同的寬度: hold on [N,X] = hist(feature_1(:,1)) Bh = bar(X,N,'facecolor',[0.7 0.2 0.2]); [A,Y] = hist(feature_2(:,1)) Bh = bar(Y,A,'facecolor',[0.3 0.6 0.2]); hold o

    1熱度

    1回答

    我目前正在研究R中包含的「鑽石」數據集。具體來說,我試圖突出顯示最常出現的605次鑽石價格(132次) 我的代碼如下: library(ggplot2) ggplot(diamonds) + geom_histogram(aes(x=price), binwidth = 10, breaks = seq(250, 1000, 10), color =

    1熱度

    2回答

    我有一個矩陣A(20374,1)。 我想使用這些數據繪製直方圖(DVH)。 我的代碼如下。 edge_A = np.linespace(0, max(A), 1000) x_A = np.linespace(0.5*max(A)/1000, max(A), 1000) n_A = np.histogram(A, bins=edge_A) y_A = 1 - np.cumsum(n_A/len

    0熱度

    1回答

    任何人都可以解釋下面突出顯示的兩行代碼,它使用repmat? bin_counts = hist(c3); % Histogram bin counts N = max(bin_counts); % Maximum bin count mu3 = mean(c3); % Data mean sigma3 = std(c3); % Data standard deviation hi

    1熱度

    1回答

    我是新來的spark和scala,我想出了scala編譯錯誤: 讓我們說我們有一個rdd,這是一個這樣的地圖: val rawData = someRDD.map{ //some ops Map( "A" -> someInt_var1 //Int "B" -> someInt_var2 //Int "C" -> somelong_var //Lon