I am using plotly in Python 2.7 to produce Gantt charts like -
But instead of filling the individual bars with color, I wish to fill them with different patterns so that it can be read even when printed in grey scale.
Is there a way to do that in Plotly? If not what other Python packages can do it?
Thanks!
Related
I am trying to plot 2D bars in a Plotly 3D figure. I understand that Plotly's 3D figures do not yet support bar charts out of the box, but I have come across some examples from other people on the Plotly forums which have shown how this might be achieved.
Please see the post Adding a shape to a 3D plot. This is close to what I am trying to achieve, but I am not trying to plot a histogram.
It appears plotting traces as a mesh3d, adding in the missing points and triangulating is the way to go for Plotly's 3D chart, according to other examples I have seen. Below is an example of what I am looking for that I created using Matplotlib.
As you can see, x axis is the date, y axis is the trace name and z axis is the value. I would like to see if I can achieve something similar using Plotly's 3D charts, which are so much better of course because of the client side interactivity.
Is there a working example for what I'm trying to achieve? I am simply looking to plot simple (date, value) per trace as 2D bars in the 3D figure.
There isn't any current way to have a bar chart in 3D with Plotly (at least that I am aware of).
Documentation: Plotly Python Open Source Graphing Library 3D Charts
As shown in the documentation, there aren’t any options for a bar chart. There are, however, alternatives like a bubble chart.
I am trying to create a grouped, stacked bar chart. I was able to do it in excel and this image shows what I am trying to create but I want to do it through Python. I have all the data in a pandas data frame that is able to create separate stacked bar charts but I cannot get the grouping as seen in excel.
Excel Formatting:
If you could do it in Excel with easy then I strongly suggest you to do it with Excel. Unless you have other requirements.
There are many libraries you can use to create this type of plot: matplotlib, seaborn, or plotly. The one I use most is plotly. You can see the list of sample figures of plotly here: https://plotly.com/python/
Or you can join plotly community, there are many pros there might help with figure. I find there is few pros on figures in stackoverflow to plotly community: https://community.plotly.com/
I am trying to implement a barchart with “relative Barmode” in Bokeh. In particular, I would like to achieve a barchart with two groups (a, b). If a is positive it should be on top of b, however, if a is negative it should be under the x-axis and below b. A chart which visualizes my wish using plotly is here:
https://plot.ly/python/bar-charts/#bar-chart-with-relative-barmode
Does anyone of you know how I can implement such visualization using bokeh barchart?
Thanks
Andy
I am unsure whether this functionality is possible through Plotly or if it is achievable with other plotting packages so I am open to different solutions.
I am trying to plot two violin plots in a single figure where one violin is oriented horizontally while the other is vertical. I would like to specify the point at which they intersect (i.e the primary axis of each). Ideally each would be transparent and interactive.
Somewhat poor illustration of what I need
Thank you for any proposed solutions!
There are multiple Python libraries doing Violin Plots. Plotly is among them, check its manual.
Besides, Seaborn is really good at this:
It is a Python visualization library based on Matplotlib. The code snipped for the above example can be found in Seaborn's gallery.
Is it possible to do overlapping bar chart in bokeh like this example in highcharts?
http://www.highcharts.com/demo/column-placement
Yes. You can definitely create this type of chart using Bokeh lower/mid level APIs. That will require some coding to prepare the data and the glyphs. You can create and draw 2 different sources for the background and foreground rects separately. The plotting API docs and the examples on the repo should be helpful.
As a side note, at the moment (0.11 version) the high level Charts API does have a Bar builder function to create Bar charts with just one line but it doesn't support overlapping bars.