visualization

Matlab: changing font size on xlabel and ylabel

被刻印的时光 ゝ 提交于 2019-12-11 10:33:52
问题 I am doing the following (this is a simple example to illustrate the problem): a = [1,3,4]; b = [1,4,5]; plot(a,b,'LineWidth',4); xlabel('recall','FontSize',35); ylabel('precision','FontSize',4); and it produces: As you can see the 'FontSize' is having no effect. I have also got the properties of the xlabel shown below: xl = xlabel('recall','FontSize',35); get(xl) FontAngle = normal FontName = Helvetica FontSize = [35] FontUnits = points FontWeight = normal 回答1: You have to install packages:

Plot Matlab colours as vertical bars

故事扮演 提交于 2019-12-11 10:25:52
问题 I stumbled upon this file exchange submission, which, given a positive integer, generates that many "maximally distinguishable" colours. The tool is working great, but I would like to visualize the colours it generates with coloured vertical bands. An example, taken from the linked blog article: For the choice of colours: ans = 0 0 1.0000 1.0000 0 0 0 1.0000 0 0 0 0.1724 1.0000 0.1034 0.7241 1.0000 0.8276 0 0 0.3448 0 We obtain the vertical bands on the left that show these colours. 回答1: A

Set colors in stacked bar plot per label

巧了我就是萌 提交于 2019-12-11 10:03:29
问题 I want to set the same colors pop up each time I run this barplot. For example: B1 = green, B2, red, B3 = blue etc. I have so far tried .setcolor but it does not provide me to set the colors for individual box numbers (B1, B2 etc) -- I could not figure it out. import pandas as pd import seaborn as sns d = {'DAY': [55,56,58,65], 'B1': [2,6,6,1], 'B2': [1,0,21,0], 'B3': [0,1,0,1]} data1= pd.DataFrame(data = d) sns.set() data1.set_index('DAY').plot(kind='bar', stacked=True) This works, but it

How do I visualize XYZ+Field volume data, stored in a simple table, in Paraview?

断了今生、忘了曾经 提交于 2019-12-11 08:53:15
问题 For rather long time I've used to work in Goldensoftware Surfer/Voxler. In this programs it's very easy to visualise table data. The scheme looks like this: data input (on this step I can specify x, y, z and a component - some physical field data)->gridding->contour/volume visualisation. But I can't find any clue how load data from table and then grid it in some way and then make a contour/volume render in Paraview. For example, I have a table: X Y Z Rho -135.25 185.25 282.84 2284.442 -135.25

Python combo chart add the percentage on the bar but wrong

非 Y 不嫁゛ 提交于 2019-12-11 08:33:19
问题 I tried to add the percentage on the bar in combo chart, line and column graphs. However, all the values displayed are messy. I provide the data here, this is also my previous post and the answer is provided by Quang Hoang. Group yq Value1 Value2 G 2014Q1 0.07 1.1 G 2014Q2 0.06 1.09 G 2014Q3 0.09 1.11 G 2014Q4 0.04 1.13 I 2014Q1 0.10 1.2 I 2014Q2 0.13 1.25 I 2014Q3 0.15 1.23 I 2014Q4 0.18 1.4 I provided the code I tried: fig, ax1 = plt.subplots(figsize=(7,5)) ax2=ax1.twinx() sns.lineplot(x=

dc.js barChart bars overlapping

我的梦境 提交于 2019-12-11 08:31:38
问题 This is my datetime barChart. When I use a fiddle (see here) to try and replicate the issue, it works as intended. NB : The data takes a while (~30sec) to load from github. Here is the code for the graph : pnlPerDaybarChart .height(300) .width(700) .dimension(dims.date) .group(groups.date.pnlSum) .valueAccessor(function(d) { return Math.abs(d.value); }) .renderTitle(false) .x(d3.time.scale().domain([minDate,maxDate])) .xUnits(d3.time.days) .colors(colorChoice) .colorAccessor(function(d) { if

Best way to display dynamic data in a webpage

你离开我真会死。 提交于 2019-12-11 08:06:30
问题 My goal is to visualize the incoming data stream on a browser. I have used activemq to queue the stream. A single message consumed from the queue looks like this: "int,date/time,int,string". I have to update my line graph on the browser (every 100ms). Any ideas? 回答1: It sounds like a use case for WebSocket. There are many ways to implement it, but a rather nice blog post on the topic is presented here. Another way is to use MQTT directly from the browser using javascript and subscribe to a

Data exploration in R: display heatmap of large matrix, quickly?

非 Y 不嫁゛ 提交于 2019-12-11 07:29:34
问题 How do I quickly visualize large matrices in R? I sometimes work with large-ish numeric matrices (e.g. 3000 x 3000), and quickly visualizing them is a very helpful quality control step. This was very easy and fast in Matlab, my previous language of choice. For example, it takes 0.5 seconds to display a 1000x1000 matrix: rand_matrix = rand(1000,1000); tic imagesc(rand_matrix) toc >> Elapsed time is 0.463903 seconds. I'd like the same powers in R, but unfortunately visualizing matrices seems

MatPlotlib Seaborn Multiple Plots formatting

你说的曾经没有我的故事 提交于 2019-12-11 07:17:11
问题 I am translating a set of R visualizations to Python. I have the following target R multiple plot histograms: Using Matplotlib and Seaborn combination and with the help of a kind StackOverflow member (see the link: Python Seaborn Distplot Y value corresponding to a given X value), I was able to create the following Python plot: I am satisfied with its appearance, except, I don't know how to put the Header information in the plots. Here is my Python code that creates the Python Charts """

How to remove margins in ggplot2 chart

女生的网名这么多〃 提交于 2019-12-11 06:57:02
问题 I am currently creating plots with ggplot2 for a latex document and discovered that ggplot2 adds many unwanted margins: painted red by plot.background=element_rect(fill="red") : small margin on the left small margin between image and legend painted violet with photoshop: margin on the left and the right 1px margin on the bottom Which more rules are needed to remove these margins? It's really difficult to google all these configuration options. This is my actual chart: library(ggplot2) library