legend

How to control winform mschart legend text alignment c#?

妖精的绣舞 提交于 2019-12-02 02:45:16
How does one set the alignment of text within a chart legend object? I've tried using: myChartName.Legends["mySeriesName"].Alignment = stringAlignment.Near With no effect. I've also tried to create custom legend items, again resulting in no effect. Text is ALWAYS centered (along with the series marker) in the legend "box". The only text I have been able to align is the title, but I don't need titles in my application. My research to date says the legend object is basically a table with (by default) two cells. If that is the case there should be a way to access those cells and manipulate them

How to create two legend objects for a single plot instance?

送分小仙女□ 提交于 2019-12-02 01:59:55
问题 I use the following example code to generate a bar plot. import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 5, 5) y = np.exp(x) w = x[1] - x[0] colors = ['blue' if idx % 2 == 0 else 'red' for idx in range(len(x))] fig, ax = plt.subplots() ax.bar(x, y, width=w, color=colors, label='sample plot') ax.legend() plt.show() plt.close(fig) I would like to show both the red and blue colors in the legend object. I can think of 2 visually appealing ideas. The first idea is to create

Matplotlib: Group different scatter markers under the same legend

你离开我真会死。 提交于 2019-12-02 01:49:13
问题 I have the following question about a Matplotlib plot. I am plotting data from different experiment as scatter plot; each of the set of data has its own marker and color. I would like to have them grouped in one single line of the legend because for me they have all the same "meaning". Es. Let's say I have 3 set of data from 3 research group: plt.plot(group1, marker='^', c='r', label='groupdata') plt.plot(group2, marker='o', c='b', label='groupdata') plt.plot(group3, marker='s', c='g', label=

Duplicate legend with geom_vline() in ggplot

烈酒焚心 提交于 2019-12-02 01:14:27
I want to create this graphic: aux_graf = structure(list(lines = structure(c(2L, 2L, 1L, 3L), .Label = c("h0", "ic", "median"), class = "factor"), values = c(21.19755, 23.06978, 24, 22.13366)), .Names = c("lines", "values"), row.names = c(NA, -4L), class = "data.frame") dadosGraf = structure(list(dados = c(18.7997, 20.5035, 18.6214, 19.9192, 21.117, 20.8353, 17.527, 17.078, 17.6197, 21.4255, 18.7545, 19.2026, 18.4187, 20.7641, 21.0553, 17.5905, 18.7561, 18.9772, 20.3084, 18.8988, 19.1688, 19.2898, 22.059, 18.5854, 17.8896, 21.1609, 26.1371, 21.4737, 30.9934, 22.8421, 24.4133, 20.4137, 25.5475,

Matplotlib: Group different scatter markers under the same legend

℡╲_俬逩灬. 提交于 2019-12-02 01:11:50
I have the following question about a Matplotlib plot. I am plotting data from different experiment as scatter plot; each of the set of data has its own marker and color. I would like to have them grouped in one single line of the legend because for me they have all the same "meaning". Es. Let's say I have 3 set of data from 3 research group: plt.plot(group1, marker='^', c='r', label='groupdata') plt.plot(group2, marker='o', c='b', label='groupdata') plt.plot(group3, marker='s', c='g', label='groupdata') I'd like to have a single line in legend that shows: ^ o s = groupdata The best way to

Fieldset: Center legend

一曲冷凌霜 提交于 2019-12-02 00:00:16
as asked many times before (but never really answered) I want to center a legend in a fieldset. The trick was done perfectly here, which I also bought for my project: http://themeforest.net/item/aloma-liquid-mobile-template/full_screen_preview/5819068 the code from the css reads like this fieldset { display: block; margin: 20px 1%; margin-bottom: 20px; padding: 0 auto; padding: 15px 0; border: 0; border-top: 1px solid #DDD; width: 98%; } legend { display: table; min-width: 0px; max-width: 70%; position: relative; margin: auto; padding: 5px 20px; color: #eee8aa; font-size: 20px; text-align:

How to increase size of legend in ggplot2

此生再无相见时 提交于 2019-12-01 22:57:37
问题 I'm new to the ggplot plotting library in R and can't work out how to increase the size of my legend. I know you can do axis manipulation with theme(axis...) but I can't find the correct argument to pass! The code I use to produce the figure is here: library(ggplot) library(ggalluvial) ggplot(data = wrong_cases_all, aes(axis1 = cae, axis2 = places, y = freq)) + scale_x_discrete(limits = c("CAE", "VGG16-Places365"))+ xlab("Model") + geom_alluvium(aes(fill = freq)) + geom_stratum() + geom_text

How to increase size of legend in ggplot2

对着背影说爱祢 提交于 2019-12-01 22:41:04
I'm new to the ggplot plotting library in R and can't work out how to increase the size of my legend. I know you can do axis manipulation with theme(axis...) but I can't find the correct argument to pass! The code I use to produce the figure is here: library(ggplot) library(ggalluvial) ggplot(data = wrong_cases_all, aes(axis1 = cae, axis2 = places, y = freq)) + scale_x_discrete(limits = c("CAE", "VGG16-Places365"))+ xlab("Model") + geom_alluvium(aes(fill = freq)) + geom_stratum() + geom_text(stat = "stratum", label.strata = TRUE) + theme_minimal() Does anybody have any tips? Example data:

Adding legend to ggplot2 with multiple lines on plot

本秂侑毒 提交于 2019-12-01 22:03:41
问题 I would really appreciate some help with this. I completely do not understand how ggplot2 is thinking about legends! The chart is based on the following data frame, called "meltdf": xval variable value 1 0.000000 Shortfall Risk 100.00 2 4.624457 Shortfall Risk 99.83 3 9.179656 Shortfall Risk 60.96 4 13.742579 Shortfall Risk 36.29 5 18.620338 Shortfall Risk 27.71 6 22.947704 Shortfall Risk 22.52 7 27.690638 Shortfall Risk 19.72 8 32.174379 Shortfall Risk 17.89 9 36.637940 Shortfall Risk 15.79

How to put multiple colormap patches in a matplotlib legend?

社会主义新天地 提交于 2019-12-01 21:03:06
Situation at hand: I have multiple groups of lines, where the lines within the same group vary according to some group specific parameter. I assign each of these lines within the same group a color from a colormap according to this parameter using a different colormap for each group. Now, I would like to add a legend to the plot with one entry per group of lines. Solution for only one set of lines: If I had only one group of lines the best way of labelling would be to add a colorbar as suggested in the answer to: Matplotlib: Add colorbar to non-mappable object . How best to do this for